Rotator¶
A container for rotation information. All rotation values are stored in degrees.
Tip
This structure is Open Sourced at https://github.com/nanos-world/nanos-world-lua-lib. Feel free to push merge requests and suggest changes!
Tip
This structure supports +, -, * and tostring operations.
Usage¶
local NewRotator = Rotator(45, 90, 180)
Functions¶
Returns |
Name |
Description |
GetForwardVector() |
Get the forward (X) unit direction vector from this component, in world space. |
|
RotateVector() |
Rotates a Vector by this Rotator. |
|
Normalize() |
In-place normalize, removes all winding and creates the “shortest route” rotation. |
|
GetNormalized() |
Returns a new Rotator normalized. |
|
IsNearlyZero(number Tolerance) |
||
IsZero() |