From 6da953e31d8db569b1801d4f67b06472d933389c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 5 Jan 2002 16:18:46 +0000 Subject: [PATCH] Moved the setting of camera fusion distance mode into the handle method so that it is updated on everyframe to ensure that switching between Drive/Flight and Trackball happens seemlessly. --- src/osgUtil/TrackballManipulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgUtil/TrackballManipulator.cpp b/src/osgUtil/TrackballManipulator.cpp index dfa8efc59..5694c2e5a 100644 --- a/src/osgUtil/TrackballManipulator.cpp +++ b/src/osgUtil/TrackballManipulator.cpp @@ -145,6 +145,7 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us } return false; case(GUIEventAdapter::FRAME): + _camera->setFusionDistanceMode(osg::Camera::PROPORTIONAL_TO_LOOK_DISTANCE); if (_thrown) { if (calcMovement()) us.requestRedraw(); @@ -188,7 +189,6 @@ void TrackballManipulator::addMouseEvent(const GUIEventAdapter& ea) bool TrackballManipulator::calcMovement() { - _camera->setFusionDistanceMode(osg::Camera::PROPORTIONAL_TO_LOOK_DISTANCE); // return if less then two events have been added. if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false;