User Tools

Site Tools


4rpl:commands:rotateobjtowards

Index

RotateObjTowards

RotateObjTowards(<-UID “ObjName” <-pos <-maxRotationDeg)

Description

Rotates an obj so that its forward, or positive Z axis, points towards the supplied vector position. The vector pos (X,Y,Z coordinates) are a position in 3D space. The max rotation can be limited by supplying a maxRotationDeg in degrees. If a negative value is specified for the maxRotationDeg, the rotation will move away from rather than towards the specified target location. The rotation of the obj is in world space, not unit local space.

Examples

RotateObjTowards(self "Barrel" V3(42 10 23) 1)

Index

4rpl/commands/rotateobjtowards.txt · Last modified: 2021/01/08 11:01 by 127.0.0.1