From Blake Williams, "I discovered why the \u2013CompositeViewer option for the osghud example does not work. The run() function adds a camera manipulator to each view that does not have one assigned, which causes the view with the HUD camera to point somewhere other than where it should. I just added a check before a new default camera manipulator is added to ensure that the view allows event focus before a camera manipulator is added."
This commit is contained in:
@@ -136,7 +136,7 @@ int CompositeViewer::run()
|
||||
++itr)
|
||||
{
|
||||
osgViewer::View* view = itr->get();
|
||||
if (view->getCameraManipulator()==0)
|
||||
if ((view->getCameraManipulator()==0) && view->getCamera()->getAllowEventFocus())
|
||||
{
|
||||
view->setCameraManipulator(new osgGA::TrackballManipulator());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user