You have to transfer the view matrix from the old camera manipulator to the new one during switching. I think there is a setByMatrix member function in the camera manipilator base class.
Try to use this, after getting the previous manipulator's matrix with getMatrix <http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00094.html#ac473ec73eca1a1f50997d668fe914317> <http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00094.html#aef5f7bfdb9d7cf2e10ed0e8d47309163> Christian 2015-02-04 13:38 GMT+01:00 Dan Shebounin <[email protected]>: > Hello! > > I'm using KeySwitchMatrixManipulator with two added manipulators: > TrackballManipulator and NodeTrackerManipulator. > > autoComputeHome is true for KeySwitch manipulator. > > TrackballManipulator centered by default in a center of a scene > > NodeTracker is looking at one of scene's model. > > When I switching a manipulators, camera position and angle changes > randomly. Is it possible to preserve a camera position and direction of > view between changes? > > Thank you! > > Cheers, > Dan > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=62593#62593 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

