The problem is I can't get it to recognise touches to the UIViewController, only the Ogre view reacts (i.e. move camera). I've read practically every thread on this forum many times over, but so far no luck.
Based on http://www.ogre3d.org/forums/viewtopic.php?f=21&t=64123, this is what I'm currently doing:
(template project, AppDelegate.h, go() function).
Code: Select all
//Get Ogre window
UIWindow *mUIWindow = nil;
Ogre::RenderWindow *mWindow = Ogre::Root::getSingleton().getAutoCreatedWindow();
mWindow->getCustomAttribute("WINDOW", &mUIWindow);
//Create custom view controller (overlay)
myViewController = [[MainViewController alloc] initWithNibName:@"TestView" bundle:nil];
//Get Ogre UIView
UIView* mUIView = mUIWindow.rootViewController.view;
//Add overlay as subview
[mUIView setFrame:myViewController.view.frame];
[mUIView addSubview:myViewController.view];
[mUIWindow bringSubviewToFront:myViewController.view];
[mUIWindow makeKeyAndVisible];
The only line of code ommited is
Code: Select all
window.rootViewController = myViewController;I'd be very grateful for any help!
