[osg-users] Is there a good way to set the rotation and orientation of the SpotLight to match the attitude of the model?

2021-02-04 Thread newli...@gmail.com
I implemented Spot Light by referring to osglight.cpp. However, it is having difficulty in implementing SpotLight to change direction according to the heading of the aircraft at the same location. Even if I get the Pitch, Roll, and Heading values of the aircraft and set the values in the

Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-09 Thread newli...@gmail.com
Hi, Robert . First of all, thank you for your interest and answer. I'm rendering using osg::Light and osg::LightSource with a spotlight pointing down. The exact position is set using light->setPosition() The direction of the light is set with the code below. osg::vec3d world =world +