View all posts
If you want to be notified about future posts, please consider subscribing:
Quaternions do not solve the gimbal lock problem. There. I said it in bold font to confirm your suspicion :). I guess you’ve read in many places something along the lines of:
“Gimbal lock problem? Just use quaternions.”
Which is totally misleading.
It really does not matter if you use quaternions or matrices. The gimbal lock problem does not arise from the “means” but from the “way” that Euler angles rotation works. I talk about it at length in the video below.
Using quaternions for rotations over using matrices does carry some advantages but they have nothing to do with gimbal lock. The actual pros of using quaternions are:
- Less storage. A quaternion needs 4 floats, whereas a 3×3 rotation matrix needs 9
- Spherical linear interpolation, a.k.a. slerp. With quaternions it is easy to smoothly and correctly interpolate between two whole orientations (an orientation is a full three vectors basis)
Please watch the video below for discussion and visual demonstrations (using Unity 3D game engine) on why quaternions and gimbal lock are actually unrelated things. The project in the video can be found on GitHub.
Direct video link: https://www.youtube.com/watch?v=kB7iE8Udq5g