Skip to content

FQuaternion

Description

Quaternions are used to represent rotations.

Static Properties Description Quaternion FQuaternion
identity The identity rotation (Read Only).
Properties Description Quaternion FQuaternion
eulerAngles Returns or sets the euler angle representation of the rotation.
normalized Returns this quaternion with a magnitude of 1 (Read Only).
this[int] Access the x, y, z, w components using [0], [1], [2], [3] respectively.
w W component of the Quaternion. Do not directly modify quaternions.
x X component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
y Y component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
z Z component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
Constructors Description Quaternion FQuaternion
Quaternion Constructs new Quaternion with given x,y,z,w components.
FQuaternion Constructs new Quaternion with given x,y,z,w components.
Public Methods Description Quaternion FMaFQuaternionth
Set Set x, y, z and w components of an existing Quaternion.
SetFromToRotation Creates a rotation which rotates from fromDirection to toDirection.
SetLookRotation Creates a rotation with the specified forward and upwards directions.
ToAngleAxis Converts a rotation to angle-axis representation (angles in degrees).
ToString Returns a formatted string of the Quaternion.
Static Methods Description Quaternion FQuaternion
Angle Returns the angle in degrees between two rotations a and b.
AngleAxis Creates a rotation which rotates angle degrees around axis.
Dot The dot product between two rotations.
Euler Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis; applied in that order.
FromToRotation Creates a rotation which rotates from fromDirection to toDirection.
Inverse Returns the Inverse of rotation.
Lerp Interpolates between a and b by t and normalizes the result afterwards. The parameter t is clamped to the range [0, 1].
LerpUnclamped Interpolates between a and b by t and normalizes the result afterwards. The parameter t is not clamped.
LookRotation Creates a rotation with the specified forward and upwards directions.
Normalize Converts this quaternion to one with the same orientation but with a magnitude of 1.
RotateTowards Rotates a rotation from towards to.
Slerp Spherically interpolates between quaternions a and b by ratio t. The parameter t is clamped to the range [0, 1].
SlerpUnclamped Spherically interpolates between a and b by t. The parameter t is not clamped.
Operators Description Quaternion FQuaternion
operator * Combines rotations lhs and rhs.
operator == Are two quaternions equal to each other?