BIS fnc relativeDirTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
m (Some wiki formatting)
 
Line 26: Line 26:
|r1= [[Number]]
|r1= [[Number]]


|x1= <code>[<nowiki/>[0,0,0], [[player]]] [[call]] [[BIS_fnc_relativeDirTo]];</code>
|x1= <sqf>[[0,0,0], player] call BIS_fnc_relativeDirTo;</sqf>


|seealso= [[getPos]] [[getRelDir]] [[direction]]
|seealso= [[getPos]] [[getRelDir]] [[direction]]
}}
}}

Latest revision as of 15:59, 13 July 2022

Hover & click on the images for description

Description

Description:
Returns the relative direction from object 1 to object/position 2. Return value is always in between 0 and 360.
Arma 3
Use getRelDir instead.
Execution:
call
Groups:
Geometry

Syntax

Syntax:
[from, to] call BIS_fnc_relativeDirTo
Parameters:
from: Object
to: Object or Array format Position
Return Value:
Number

Examples

Example 1:
[[0,0,0], player] call BIS_fnc_relativeDirTo;

Additional Information

See also:
getPos getRelDir direction

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note