quat.multiply not giving correct values
I have an object that is suppose to rotate from its original position to zero, based on head turn by mapping the head turn to a range where looking straight is 1 and zero on either sides. I am taking that value, turning it into a quat and .multiplying to its original rotation, and the math is not coming out correct.
Here's the project file for reference https://www.dropbox.com/sh/hd5n310670da5e0/AAB6uqr1zT8vdW5rgbEDuM0fa?dl=0
Hi Pete,
It might be a bit tricky to directly modify the quaternion in order to map rotation (as it doesn't store euler angles directly). Have you considered using slerp in order to do rotation mapping instead?
Something like:
The other reason why you want to use quaternion function directly is that we might get gimbal lock issues when trying to convert to euler rotation first.
Let me know if this makes sense or if I misunderstood your question.
Cheers!
Jonathan