I've created a child class of osgGA::TerrainManipulator that restricts the camera so that its up vector cannot tilt sideways (no camera banking). This only allows for operations like zooming in, rotating the scene around the intersection of the screen's centerpoint with the model and pure translation. This is pretty similar to what 3D mapping applications allow to do with the mouse.
Christian 2016-04-11 18:35 GMT+02:00 Robert Osfield <robert.osfi...@gmail.com>: > Hi Bruno, > > On 11 April 2016 at 16:21, Bruno Oliveira <bruno.manata.olive...@gmail.com > > wrote: > >> How do I allow my mouse manipulator (actually an >> osg::TrackballManipulator) to allow moving in 2D plane only? >> >> This is for vieweing an image and I want something similar to google maps >> or so >> > > The TrackballManipulator is a 3D manipulator and has no support for > constraining to a 3D plane. > > If you want 2D movement then you will need to write your own > "MapManipulator" or just set the the Viewer's master Camera's ViewMatrix > directly with the frame loop. > > Robert. > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org