I have two quaternions,
q2. If my object's current rotation is at
q1, but I need to get it to
q2, what would be the process to figure out how much rotation I apply to x, y, and z in order to get there?
In this example, x=right, y=up, z=forward
I've tried getting the delta between the two quaternions and unwrapping that into Eulers and moving the x, y, z the amount of the unwraped Vector3f, but that does not seem to give the correct values. Current implementation in pseudo code:
var dQuat = Quaternion.Inverse(prevRotation) * target.rotation; dChange = dQuat.eulerAngles;
This approach gives me only positive changes. If I rotate forward on x, I get positive lower numbers and if I rotate backwards on x, I get larger positive numbers.
I'm looking for, in order to get to
n degrees along your x, y, z...
Thanks in advance for any help!