Hello,
I was trying to use the setViewMatrixAsLookAt matrix like I would use
gluLookAt (since they are similar), my intention is to create a rotation
around a point. So first I selected the eye position which should be
(0,-25,25) and wanted to point the camera towards (0,0,0) where my object
is placed, so basically the code looks like this:
viewer.getCamera()->setViewMatrixAsLookAt(osg::Vec3(0,-25,25),
osg::Vec3(0,0,0), osg::Vec3(0,1,0) );
but rendering this scene creates some confusing perspective, the position of
the camera seems right but even if I am looking at (0,0,0) the object I am
looking at is at the top of the screen and not centered, as I supposed.
While placing the object at scene's origin, shouldn't this setup center this
object since I am looking at (0,0,0) ?
Greetings
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org