It sounds like you are setting a view that includes the positions of your lights. I assume you're creating that view based on your entire scene's bounding volume. If so, then the solution is to use only the bounding volume of your geometry (exclusive of LightSource nodes) as input to your view computation.
For example, if you have a top-level group node with two children, child A is the topmost node of a subgraph containing the lights, and child B is the topmost node of a subgraph containing the geometry, then obtain child B's bounding volume and use that to determine your camera position and viewing angle. -Paul > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Tuesday, June 12, 2007 10:40 AM > To: osg-users > Subject: [osg-users] Re:Light > > Hi Paul > > Sorry...My mail was not clear... > I dont want to move the light nodes....but instead reset the > camera position. > > Yes I'm using osgViewer... > > I have some drawables in the middle of my scene. > Then i have some lights far then these drawables. > > When i press the spacebar my camera go far away then my > drawable...becouse it also include the lights in the windows. > > How can I automatically reset the camera position in order to > have only the drawable inside my windows? > > Hope its better now > > Thanks Paul > > >Do you mean you're using osgviewer? If so, spacebar the > camera position > >-- it doesn't affect the transformation of >individual > objects in your > >scene. > > >If you want your light to move independently of the rest of >your > >scene, based on some key press, you'll need to add your own event > >>handler to capture your key press and modify the appropriate > >>transformation matrices accordingly. > > >Hope that helps, > > -Paul > > > ------------------------------------------------------ > Passa a Infostrada. ADSL e Telefono senza limiti e senza > canone Telecom http://click.libero.it/infostrada > > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/