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.
This commit is contained in:
Robert Osfield
2002-01-05 16:18:46 +00:00
parent 42fd25c613
commit 6da953e31d

View File

@@ -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;