关于四元数和欧拉角的一段引用
That rotation though is still a quaternion, you can then convert it to whatever you want.
Just remember, quaternion exist for a reason... things like euler angles jump around or get locked (gimbal lock) because of the way they're designed. Quaternions don't suffer from these problems, if you want to save things like "change in angles"... save them as a quaternion, and do your math that way.
A quaternion is more like a "how much rotation to apply, or was applied". A eulerAngle is more a "at what rotation am I relative to no rotation". The quat is more robust because "how much rotation to apply" can be relative to any other rotation (including no rotation). It's stackable. Euler angles are ALWAYS relative to the same thing (no rotation)... making them not stack well (this is a simplification of course).
网友评论