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

newli...@gmail.com newlife958 at gmail.com
Thu Feb 4 17:26:34 PST 2021


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 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?

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/035bc04b-3175-47f5-a449-3170aac59962n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210204/d3178ebd/attachment.html>


More information about the osg-users mailing list