~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:GetUnitForward|Get]] * [[4rpl:commands:SetUnitForward|Set]] ====== 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 <=[[4rpl:start| Index]]