User Tools

Site Tools


4rpl:commands:setobjrotation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
4rpl:commands:setobjrotation [2021/01/08 16:01] – external edit 127.0.0.14rpl:commands:setobjrotation [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
 +
 +<WRAP tabs>
 +  * [[4rpl:commands:GetObjRotation|Get]]
 +  * [[4rpl:commands:SetObjRotation|Set]]
 +</WRAP>
  
 ====== SetObjRotation ====== ====== SetObjRotation ======
Line 9: Line 14:
 If world is false then the rotation is relative to the object's parent, otherwise the rotation is a world rotation. If world is false then the rotation is relative to the object's parent, otherwise the rotation is a world rotation.
 Note, use "" (empty string) to indicate the root level object. Note, use "" (empty string) to indicate the root level object.
 +
 +:!: **Note:** Because SetObjRotation sets the value of [[https://docs.unity3d.com/ScriptReference/Transform-eulerAngles.html|eulerAngles]], some rotations will get represented differently when you set euler angles and then read them back out. Do not expect that the values set by SetObjRotation or the initial values set in the unit settings will come out the same when retrieved with GetObjRotation. For example, a unit that's set with a rotation of (180, 0, 0) will produce a result of (0, 180, 180) when retrieved with GetObjRotation.
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/setobjrotation.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)