This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:setunitrotation [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:setunitrotation [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
< | < | ||
+ | |||
+ | <WRAP tabs> | ||
+ | * [[4rpl: | ||
+ | * [[4rpl: | ||
+ | </ | ||
====== SetUnitRotation ====== | ====== SetUnitRotation ====== | ||
Line 8: | Line 13: | ||
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. | 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 ' | Note the Y axis is the ' | ||
+ | |||
+ | 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 ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
SetUnitRotation(< | SetUnitRotation(< | ||
</ | </ | ||
+ | |||
+ | === See also === | ||
+ | |||
+ | * [[SetUnitOrientation]] snaps unit orientation to 90° orientation | ||
+ | |||
< | < | ||