To move the camera forwards or backwards, modify the modelview matrix -- in OSG, a Camera manipulator will do this for you.

To zoom in and out (without moving the camera), change the field of view parameter to the projection matrix. (I haven't looked at the code, but I believe some Camera manipulator classes might provide a function to let you set the field of view... I prefer to do this by explicitly setting the projection matrix directly on the Camera.)

The two operations (moving the camera forward/backward, and zooming) are often confused, but they produce very different visual effects.
   -Paul


On 7/19/2012 2:12 PM, Dan Marshal wrote:
"(*) In perspective, the code allows you to move the eye forwards or backwards without 
changing the FOV, so this is not a "zoom""

How to I change the distance from the camera without using the 
TrackBallManipulator?  All I want to do is a perspective move forward and 
backward to the center of the screen and I don't see how to do this without 
creating a custom manipulator which I do not want to do...

Thank you very much.

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





_______________________________________________
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

Reply via email to