On Dec 31, 2007 5:05 AM, Yanling Liu <[EMAIL PROTECTED]> wrote: > Hi, could you please help me to create a light following camera, such as a > head light? Thanks!
The osgViewer::Viewer already by default creates a light that works as a headlight. If you wish to disable this feature via View(er)::setLightingMode(osg::View::NO_LIGHT); then you create the same effect by placing a osg::LightSource in the scene graph and set its ReferenceFrame to ABSOLUTE_RF so that its modelview matrix is initialized to identity placing the attached light relative to the eye/camera coordinate frame. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

