BIS fnc relativeDirTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Feature arma3|" to "{{Feature|arma3|")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


|arma2|Game name=
|arma2|Game name=
Line 7: Line 6:


|gr1 = Geometry |GROUP1=
|gr1 = Geometry |GROUP1=
____________________________________________________________________________________________


|Returns the relative direction from object 1 to object/position 2. Return value is always in between 0 and 360.
|Returns the relative direction from object 1 to object/position 2. Return value is always in between 0 and 360.
{{Feature|arma3|In Arma 3 use [[getRelDir]] instead.}}|DESCRIPTION=
{{Feature|arma3|In Arma 3 use [[getRelDir]] instead.}}|DESCRIPTION=
____________________________________________________________________________________________


|[point1, point2] call '''BIS_fnc_relativeDirTo'''|SYNTAX=
|[point1, point2] call '''BIS_fnc_relativeDirTo'''|SYNTAX=
Line 20: Line 17:


|[[Number]]|RETURNVALUE=
|[[Number]]|RETURNVALUE=
____________________________________________________________________________________________


|x1= <code><nowiki>[</nowiki>[0,0,0], [[player]]] [[call]] '''BIS_fnc_relPos''';</code> |EXAMPLE1=
|x1= <code><nowiki>[</nowiki>[0,0,0], [[player]]] [[call]] '''BIS_fnc_relPos''';</code> |EXAMPLE1=
____________________________________________________________________________________________


|[[getPos]] [[getRelDir]] [[direction]]|SEEALSO=
|[[getPos]] [[getRelDir]] [[direction]]|SEEALSO=

Revision as of 23:52, 16 January 2021

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
In Arma 3 use getRelDir instead.
Execution:
call
Groups:
Geometry

Syntax

Syntax:
[point1, point2] call BIS_fnc_relativeDirTo
Parameters:
point1: Object - First point.
point2: Number or Object - Second point.
Return Value:
Number

Examples

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

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

Notes

Bottom Section