If you're rendering in 3d, 20 pixels doesn't have a lot of meaning. In general what you'd need to do is transform 20 pixels into your world's coordinates. Transform 20 pixels into normalized screen coordinates, something like:
gridUnit = 20/screenWidth/2; Then transform gridUnit into world coordinates. Something like: osg::Vec3 p(gridUnit, gridUnit, 1); p = p*inverseMatrix; The problem is, again, that 20 pixels will have different 3d sizes depending on the depth of what you're snapping. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13060#13060 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

