Technical question on Euler angles and quaternions

If we use the Euler representation of quaternions does Unity avoid the problem of gimble lock that one usually gets with Euler angles?​

If not, then using quaternions is easy enough once you get used to them. However, you do have to do some math to convert our intuition for angles into the components of a quaternion as well as dealing with that fact that the order you apply a quaternion matters (they are non-commutative, i.e. ab != ba). Personally, I find it easier to think of rotations as in a plane when dealing with these guys (for example, rotation around the x-axis would be in the yz-plane).

FYI, for those who want to know more here is a good technical summary of quaternions used for rotations (what is called a rotor):

Quaternions and Spacial Rotations

Privacy & Terms