User Tools

Site Tools


4rpl:commands:getunitforward

Index

GetUnitForward

GetUnitForward(<-UID) ->forward

Description

Get the 'forward' vector of a unit. The forward vector is the direction of a units positive Z axis. For an unrotated unit the forward direction would be {0 0 1}. As a unit rotates the direction of the Z axis can point in any direction. GetUnitForward will return a vector of three floats for the X, Y, and Z direction of that vector.

Examples

GetUnitForward(<-UID) ->forward
trace(<-forward.x) # x component of forward vector

Index

4rpl/commands/getunitforward.txt · Last modified: 2021/01/24 14:53 by Sanian