BIS fnc relativeDirTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Geometry(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Some wiki formatting)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


|arma2|Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1 = Geometry |GROUP1=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


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


|[point1, point2] call '''BIS_fnc_relativeDirTo'''|SYNTAX=
|gr1= Geometry


|p1= point1: [[Object]] - First point.|PARAMETER1=
|descr= Returns the relative direction from object 1 to object/position 2. Return value is always in between 0 and 360.
{{Feature|arma3|Use [[getRelDir]] instead.}}


|p2= point2: [[Number]] or [[Object]] - Second point.|PARAMETER2=
|s1= [from, to] call [[BIS_fnc_relativeDirTo]]


|[[Number]]|RETURNVALUE=
|p1= from: [[Object]]
____________________________________________________________________________________________


|x1= <code><nowiki>[</nowiki>[0,0,0], [[player]]] [[call]] '''BIS_fnc_relPos''';</code> |EXAMPLE1=
|p2= to: [[Object]] or [[Array]] format [[Position]]
____________________________________________________________________________________________


|[[getPos]] [[getRelDir]] [[direction]]|SEEALSO=
|r1= [[Number]]
}}


<h3 style="display:none">Notes</h3>
|x1= <sqf>[[0,0,0], player] call BIS_fnc_relativeDirTo;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[getPos]] [[getRelDir]] [[direction]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Functions|{{uc:relativeDirTo}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:relativeDirTo}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:relativeDirTo}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:relativeDirTo}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:relativeDirTo}}]]

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