User Tools

Site Tools


4rpl:commands:getobjfacingangle

Index

GetObjFacingAngle

GetObjFacingAngle(<-UID “ObjName” <-pos) ->angle

Description

Returns the angle in degrees between the obj's forward (the z direction) and the specified vector world position. The vector (X,Y,Z coordinates) are a position in 3D world space. An obj is facing a position when the forward (z direction) of the obj it pointing directly at the position. This function works using world coordinates. The resulting angle is in degrees.

Examples

GetObjFacingAngle(self "Barrel" V3(42 10 23)) ->angle

Index

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