Hi this is correct, camera position is osg_ViewMatrixInverse[3].xyz
Cheers. 21.12.2012, 17:25, "Ethan Fahy" <[email protected]>: > I looked around the web to try to figure out how to also get the camera XYZ > in world space. According to sources I should be able to get the camera > world coordinates from the last column of the inverse view matrix. Is this > correct? > > Code: > > vec3 cameraPositionWorldCoordinates; > cameraPositionWorldCoordinates[0] = osg_ViewMatrixInverse[3][0]; > cameraPositionWorldCoordinates[1] = osg_ViewMatrixInverse[3][1]; > cameraPositionWorldCoordinates[2] = osg_ViewMatrixInverse[3][2]; > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51672#51672 > > _______________________________________________ > 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

