|
Hello, Have a Nice Day!
I implemented Spot Light by referring to osgearth_lights.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 light->Direction() of Light, even if I add them to the osg::PositionAttitudeTransform object and set the values in setAttitude(), the desired result is not obtained.
In common sense, I think you can only rotate the SpotLight's z axis to match the aircraft's heading... The result is not implemented as expected.
Is there a good way to set the rotation and orientation of the SpotLight to match the attitude of the model?
Thank you.
|