Quaternion Basics

Quaternions are more specific rotations. They help solve problems that Euler-based rotations run into.

Definition

A Quaternion is a Core type that defines the orientation of an object. An orientation can be imagined as an angle amount (θ) around a certain vector named the Euler axis (ê).

Quaternion Components

Unlike Euler angles, quaternions uses four components (w, x, y, z) to compute the rotation. These components are part of an equation using the Euler axis vector components (i, j, k) and angle (θ).

Use Cases

A common problem with Euler angles that quaternions avoid is gimbal-lock. Quaternions also have a useful function named Slerp that transitions a starting rotation to a new rotation.

Example using a Quaternion’s Slerp function to transition the left skeleton’s orientation to the right skeleton’s orientation.
Scroll to Top