March 2019
Intermediate to advanced
708 pages
17h 9m
English
Quaternions, being vectors themselves, can be rotated. Simply extract the (x, y, z) components of the quaternion, normalize, and then rotate that vector. Construct a new quaternion from that new unit vector with the desired angle of rotation.
Multiplying quaternions together represents a series of rotations that happen subsequently. For example, a rotation of 45º about the X-axis, followed by a rotation of 45º about the Y-axis will be composed by the following:
FQuat( FVector( 1, 0, 0 ), PI/4.f ) * FQuat( FVector( 0, 1, 0 ), PI/4.f );
This would give you a result that would look similar to this:

Read now
Unlock full access