Hello,
I am trying to set my view and projection camera matrix. I do this inside a custom camera manipulator code I am building. I set the camera view matrix as camera->setViewMatrix(getInverseMatrix()); After this, since I am using a perspective projection matrix, I know I need to update my projection matrix. I try to do this with camera->setProjectionMatrixAsPerspective(30.f, aspectRatio, 0.5f, 500.f); This results in the following projection matrix, 2.69691 0 0 0 0 3.73205 0 0 0 0 -1.002 -1 0 0 -1.001 0 However this is wrong, my matrix should be something similar to 2.69691 0 0 0 0 3.73205 0 0 0 0 -50 -1 0 0 -1.01309e+06 0 What am I doing wrong? What else do I need to correctly compute the projection matrix?
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org