[quote="Trajce Nikolov NICK"]Hi,
if your shadows are moving with the camera, then you are using the default
viewer lighting mode which moves the light with the camera. Try setting the
viewer with no light ( viewer->setLightingMode(osg::View::NO_LIGHT); ) and set
your own LightSource in the scene that you can position yourself. Here is
snippet from my app that might help:
_viewer->getView(0)->setSceneData(_scene);
_sun = new osg::LightSource;
_sun->getLight()->setLightNum(0);
_sun->setName("SUN");
_sun->setCullingActive(false);
_scene->addChild(_sun.get());
then you position _sun->getLight() with zero (0) for the last argument in
_sun->getLight()->setPosition(osg::Vec3(x,y,z),0)
Nick
[/quote]
Thank for your answer, but, the thing is, I need my light to be a point light.
It cannot be a directionnal light or a spotlight. Indeed, it work with a
directionnal light. But not like I need it to work. But thank you to have took
the time to respond me.
I need a light that cast light in all direction, and shadow that correspond to
the position of the light.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59333#59333
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org