Summary

Euler angles. Unlike a Rotation, Euler angles can represent multiple revolutions (rotations) around an axis, but suffer from issues like gimbal lock and lack of a defined "up" vector. Use Rotation for most cases.

Constructors

Angles Initializes the angles object with given components.

Fields

pitch The pitch component, typically up/down.
roll The roll component, basically rotation around the axis.
yaw The yaw component, typically left/right.

Properties

Forward The forward direction vector for this angle.
Normal Returns normalized version of this object, meaning the angle on each axis is normalized to range of (-180,180].

Methods

AsVector3 Return as a Vector3, where x = pitch etc
Clamped Returns clamped version of this object, meaning the angle on each axis is transformed to range of [0,360).
IsNearlyZero Returns true if this angles object's components are all nearly zero with given tolerance.
LerpTo Performs linear interpolation on the two given angle objects.
SnapToGrid Snap to grid
ToRotation Converts these Euler angles to a rotation. The angles will be normalized.
WithPitch Returns this angles object with given pitch component.
WithRoll Returns this angles object with given roll component.
WithYaw Returns this angles object with given yaw component.

Static Fields

Zero An angle constant that has all its values set to 0. Use this instead of making a static 0,0,0 object yourself.

Static Properties

Random Returns the angles of a uniformly random rotation.

Static Methods

AngleVector Converts an angle to a forward vector.
ClampAngle Clamps the angle to range of [0, 360)
Lerp Performs linear interpolation on the two given angle objects.
NormalizeAngle Normalizes the angle to range of (-180, 180]
Parse Given a string, try to convert this into an angles object. The format is "p,y,r".
TryParse
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.