Hi,

I am using the setViewMatrixAsLookAt to set up my camera.

I have set up my camera as follows:


> viewer.getCamera()->setViewMatrixAsLookAt(osg::Vec3(XCoordinate,YCoordinate,ZCoordinate),
>  osg::Vec3(XCoordinate - 
> 10*cos(osg::DegreesToRadians(Pitch))*sin(osg::DegreesToRadians(Yaw)),YCoordinate
>  + 
> 10*cos(osg::DegreesToRadians(Pitch))*cos(osg::DegreesToRadians(Yaw)),ZCoordinate
>  + 10*sin(osg::DegreesToRadians(Pitch))), osg::Vec3(0.0, 0.0, 1.0));


My XCoordinate, YCoordinate and ZCoordinate values remain constant over the 
whole code and the values of Roll, Pitch, Yaw change and yet when the Roll, 
Pitch, Yaw are changed, the position of the camera's eye is being changed. Even 
though I defined the eye's position as 
osg::Vec3(XCoordinate,YCoordinate,ZCoordinate). Seems a bit odd for me to 
understand why this is happening.

Thank you!

Cheers,
John

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to