User Tools

Site Tools


4rpl:commands:setobjrotation

Index

SetObjRotation

SetObjRotation(<-Unit “ObjName” <-rotDeg <-world)

Description

Sets the X,Y,Z angle in degrees of a unit's object from the specified rotDeg vector. Objects are the sub-parts that make up a unit. 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: Because SetObjRotation sets the value of 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

SetObjRotation(self "Arm" <-rotDeg false)

Index

4rpl/commands/setobjrotation.txt · Last modified: 2021/09/13 13:53 by Grabz