BIS fnc relativeDirTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
(page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
|arma2|= Game name


|1.00|= Game version
|1.00|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
|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
Relative Direction To
____________________________________________________________________________________________
 
Parameters: [object 1, object or position 2]
 
Returns the relative direction from object 1 to
object/position 2. Return is always 0-360.
 
A position to the right of unit would be at a relative direction of 90 degrees, for example.
 
Example: [player, getpos dude] call BIS_fnc_relativeDirTo
************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|[point1, point2] call '''BIS_fnc_relativeDirTo'''|= Syntax
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_relativeDirTo]]; --> |= Syntax
|p1= point1: [[Object]] - First point.|= Parameter 1


|p1= |= Parameter 1
|p2= point2: [[Number]] or [[Object]] - Second point.|= Parameter 2


| |= Return value
|[[Number]]|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


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


|[[getRelDir]] |= See also
|[[getPos]] [[getRelDir]] [[direction]]|= See also
 
}}
}}



Revision as of 11:01, 26 April 2018

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:
Uncategorised

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