A flight model issue:
The space ship has orientation q1. The flight controls cause yaw y, pitch p and roll r which give q2 = Quaternion.FromYawPitchRoll(y,p,r).
A simple visual test applying just yaw to several randomly oriented spaceships made each space ship rotate around the world y axis regardless of orientation when using Quaternion.Concatenate(q1, q2).
So I've missed something - q2 is relative to world coordinates not the current orientation of the given spaceship.
I need to something to q2 so that it's relative to the space ships current orientation not the world axis, then apply it to q1 to get the new orientation.
Can someone supply the correct line of code or the operations I need to do to q1 and q2, please?
Thanks in advance.
PS. Using XNA4.
The wrong quarternion
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement