Quaternion¶
Represents a quaternion used for rotations.
Not newable
This object cannot be created by scripts using Instance.New().
Properties¶
X : number¶
The X component of the quaternion.
Y : number¶
The Y component of the quaternion.
Z : number¶
The Z component of the quaternion.
W : number¶
The W component of the quaternion.
Identity : Quaternion¶
The identity rotation.
Methods¶
New → Quaternion¶
Parameters: ``
Creates a new Quaternion object with the specified components.
New → Quaternion¶
Parameters
x [ number ]
y [ number ]
z [ number ]
w [ number ]
Creates a new Quaternion object with the specified components.
Angle → Quaternion¶
Calculates the angle between two quaternions.
AngleAxis → Quaternion¶
Creates a rotation which rotates angle degrees around axis.
Dot → Quaternion¶
Calculates the dot product of two quaternions.
Euler → Quaternion¶
Parameters
x [ number ]
y [ number ]
z [ number ]
Creates a quaternion from Euler angles specified by a Vector3.
Euler → Quaternion¶
Parameters: euler [ Vector3 ]
Creates a quaternion from Euler angles specified by a Vector3.
ToEuler → Vector3¶
Parameters: euler [ Quaternion ]
Converts a quaternion to Euler angles represented as a Vector3.
FromToRotation → Quaternion¶
Creates a rotation which rotates angle degrees around axis.
Inverse → Quaternion¶
Parameters: rotation [ Quaternion ]
Calculates the inverse of a quaternion.
Lerp → Quaternion¶
Linearly interpolates between two quaternions.
LerpUnclamped → Quaternion¶
Linearly interpolates between two quaternions without clamping the interpolant.
LookRotation → Quaternion¶
Parameters: forward [ Vector3 ]
Creates a rotation with the specified forward and upwards directions.
LookRotation → Quaternion¶
Creates a rotation with the specified forward and upwards directions.
Normalize → Quaternion¶
Parameters: quaternion [ Quaternion ]
Normalizes the given quaternion.
RotateTowards → Quaternion¶
Rotates a rotation from towards to by maxDegreesDelta.
Slerp → Quaternion¶
Spherically interpolates between two quaternions.
SlerpUnclamped → Quaternion¶
Spherically interpolates between two quaternions without clamping the interpolant.