Component
Gameplay
(NOTE) Defines a new basis for a desired right, up, and forward vector. Provides a bunch of helper functions to change between these spaces and to perform simple look-at behavior.
Properties
AbsoluteAngle : real
read-only
Get the angle of the object about the up vector.
var AbsoluteAngle : Real
DefaultOrientationBases : OrientationBases
var DefaultOrientationBases : OrientationBases
GlobalUp : real3
The world-space up vector to use for LookAt operations that don't take an up vector.
var GlobalUp : Real3
LocalForward : real3
read-only
The orientation's forward vector after having been transformed into local space.
var LocalForward : Real3
LocalOrientationBasis : quaternion
A local-space basis that represents this orientation. If you build a basis from an up of (0, 1, 0), and a forward of (0, 0, -1) then this should result in the identity rotation.
var LocalOrientationBasis : Quaternion
LocalRight : real3
read-only
The orientation's right vector after having been transformed into local space.
var LocalRight : Real3
LocalToOrientationRotation : quaternion
read-only
The rotation that takes an local space vector into orientation space. For example, this transforms LocalRight into OrientationRight.
var LocalToOrientationRotation : Quaternion
LocalToWorldRotation : quaternion
read-only
The rotation that transforms a vector from local space into world space. For example, this transforms LocalRight into WorldRight.
var LocalToWorldRotation : Quaternion
LocalUp : real3
read-only
The orientation's up vector after having been transformed into local space.
var LocalUp : Real3
OrientationForward : real3
read-only
The forward vector in orientation space. This is always the vector (0, 0, -1) but is provided for clarity with transformations.
var OrientationForward : Real3
OrientationRight : real3
read-only
The right vector in orientation space. This is always the vector (1, 0, 0) but is provided for clarity with transformations.
var OrientationRight : Real3
OrientationToLocalRotation : quaternion
read-only
The rotation that takes an orientation space vector into local space. For example, this transforms OrientationRight into LocalRight.
var OrientationToLocalRotation : Quaternion
OrientationToWorldRotation : quaternion
read-only
The rotation that takes an orientation space vector into world space. For example, this transforms OrientationRight into WorldRight.
var OrientationToWorldRotation : Quaternion
OrientationUp : real3
read-only
The up vector in orientation space. This is always the vector (0, 1, 0) but is provided for clarity with transformations.
var OrientationUp : Real3
WorldForward : real3
read-only
The orientation's forward vector after having been transformed into world space.
var WorldForward : Real3
WorldRight : real3
read-only
The orientation's right vector after having been transformed into world space.
var WorldRight : Real3
WorldToLocalRotation : quaternion
read-only
The rotation that transforms a vector from world space into local space. For example, this transforms WorldRight into LocalRight.
var WorldToLocalRotation : Quaternion
WorldToOrientationRotation : quaternion
read-only
The rotation that takes an world space vector into orientation space. For example, this transforms WorldRight into OrientationRight.
var WorldToOrientationRotation : Quaternion
WorldUp : real3
read-only
The orientation's up vector after having been transformed into world space.
var WorldUp : Real3
Methods
ComputeSignedAngle : real
Compute the rotation angle between two vectors (in radians) |Name|Type|Description| |---|---|---| |up|real3| | |forward|real3| | |newVector|real3| |
function ComputeSignedAngle(up : Real3, forward : Real3, newVector : Real3) : Real
DebugDrawBases : Void
Debug draws the current orientation bases in world space. |Name|Type|Description| |---|---|---|
function DebugDrawBases()
GetLookAtDirectionRotation : quaternion
Gets the forward to look in the given direction. Keeps the current world up. |Name|Type|Description| |---|---|---| |lookDir|real3| |
function GetLookAtDirectionRotation(lookDir : Real3) : Quaternion
GetLookAtDirectionWithUpRotation : quaternion
Same as GetLookAtDirectionRotation but allows the user to specify the up vector. |Name|Type|Description| |---|---|---| |lookDir|real3| | |up|real3| |
function GetLookAtDirectionWithUpRotation(lookDir : Real3, up : Real3) : Quaternion
GetLookAtPointRotation : quaternion
Get the rotation so that the forward will look at the given point. Keeps the current world up. |Name|Type|Description| |---|---|---| |lookPoint|real3| |
function GetLookAtPointRotation(lookPoint : Real3) : Quaternion
GetLookAtPointWithUpRotation : quaternion
Same as GetLookAtPointRotation but allows the user to specify the up vector. |Name|Type|Description| |---|---|---| |lookPoint|real3| | |up|real3| |
function GetLookAtPointWithUpRotation(lookPoint : Real3, up : Real3) : Quaternion
LookAtDirection : Void
Sets the forward to look in the given direction. Keeps the current world up. |Name|Type|Description| |---|---|---| |lookDir|real3| |
function LookAtDirection(lookDir : Real3)
LookAtDirectionWithUp : Void
Same as LookAtDirection but allows the user to specify the up vector. |Name|Type|Description| |---|---|---| |lookDir|real3| | |up|real3| |
function LookAtDirectionWithUp(lookDir : Real3, up : Real3)
LookAtPoint : Void
Sets the forward to look at the given point. Keeps the current world up. |Name|Type|Description| |---|---|---| |lookPoint|real3| |
function LookAtPoint(lookPoint : Real3)
LookAtPointWithUp : Void
Same as LookAtPoint but allows the user to specify the up vector. |Name|Type|Description| |---|---|---| |lookPoint|real3| | |up|real3| |
function LookAtPointWithUp(lookPoint : Real3, up : Real3)
Orientation : Void
constructor
Name Type Description function Orientation()
SetLocalLookAtRotation : Void
Set the transform's local rotation such that the orientation's basis vectors will be aligned with the given rotation (assumed to be a look-at rotation constructed from a right, up, and forward) |Name|Type|Description| |---|---|---| |localLookAtRotation|quaternion| |
function SetLocalLookAtRotation(localLookAtRotation : Quaternion)
SetWorldLookAtRotation : Void
Set the transform's world rotation such that the orientation's basis vectors will be aligned with the given rotation (assumed to be a look-at rotation constructed from a right, up, and forward) |Name|Type|Description| |---|---|---| |worldLookAtRotation|quaternion| |
function SetWorldLookAtRotation(worldLookAtRotation : Quaternion)