getRelDir

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.56
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.56

Description

Description:
Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo. Taking the current direction of the object into account.

Syntax

Syntax:
object getRelDir position
Parameters:
object: Object
position: Object, Position2D or Position3D
Return Value:
Number

Examples

Example 1:
_reldir = player getRelDir tank;

Additional Information

Multiplayer:
-
See also:
getDirdirectiongetDirVisual

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section

Posted on August 7, 2018 - 21:50 (UTC)
Tankbuster
To clarify, this returns a relative direction, so objects directly in front are said to be at zero degrees. So, taking example 1 above, if the tank is in front of the player, this function will return 0. If the tank is to the right of the player, it will return 90.