[osg-users] [3rdparty] How to change camera's yaw and pitch, and move front, back and sideways according to that?

Sam Brkopac brkopac at gmail.com
Thu Jan 31 06:58:54 PST 2019


Hi Rodrigo,

The Camera::setViewMatrixLookAt function is equivalent to the gluLookAt. You can find more documentation on the inner workings here (https://stackoverflow.com/questions/21830340/understanding-glmlookat).

If you don't set a camera manipulator prior to viewer.run() and move the camera the results will be lost due to viewer.run() setting up its own manipulator and overriding your initial setup. You have a few options: assign the camera manipulator -> update the manipulator -> call home(1) to force an update. Don't call viewer.run() and implement the loop yourself (this will prevent a manipulator from getting set and allowing you to freely manually manipulate the camera). Implement your own manipulator and set it before you call viewer.run().

If you have a specific question regarding one of the manipulators, please ask.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75575#75575







More information about the osg-users mailing list