Thanks, and I appreciate you pointing out the short-hand version.
hybr wrote: > Hi > > this is correct, camera position is osg_ViewMatrixInverse[3].xyz > > Cheers. > > 21.12.2012, 17:25, "Ethan Fahy" <>: > > > 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 > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51674#51674 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

