~~NOTOC~~
<=[[4rpl:start| Index]]
* [[4rpl:commands:GetUnitRotation|Get]]
* [[4rpl:commands:SetUnitRotation|Set]]
====== SetUnitRotation ======
SetUnitRotation(<-UID <-rotDeg)
===== Description =====
Set the rotation of a unit, in degrees. A vector (x,y,z) is passed in representing the rotation around the x,y,z axes.
Note the Y axis is the 'vertical' axis relative to the map plane.
Note: The rotation API will rotate the unit, but no changes will be made the map cells occupied by the unit. Non 90 degree rotations aren't supported by the map cells. To properly reflect rotation on occupied map cells, use the Unit Orientation APIs.
===== Examples =====
SetUnitRotation(<-UID V3(0 45 0))
=== See also ===
* [[SetUnitOrientation]] snaps unit orientation to 90° orientation
<=[[4rpl:start| Index]]