BIS fnc relativeDirTo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (Some wiki formatting)
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |= Game name
|game2= arma2oa
|version2= 1.50


|1.00|= Game version
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| <pre>
|game4= arma3
/************************************************************
|version4= 0.50
Relative Direction To


Parameters: [object 1, object or position 2]
|gr1= Geometry


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


A position to the right of unit would be at a relative direction of 90 degrees, for example.
|s1= [from, to] call [[BIS_fnc_relativeDirTo]]


Example: [player, getpos dude] call BIS_fnc_relativeDirTo
|p1= from: [[Object]]
************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= to: [[Object]] or [[Array]] format [[Position]]
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_relativeDirTo]]; --> |= Syntax
|r1= [[Number]]


|p1= |= Parameter 1
|x1= <sqf>[[0,0,0], player] call BIS_fnc_relativeDirTo;</sqf>
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
|[[getRelDir]] |= See also


|seealso= [[getPos]] [[getRelDir]] [[direction]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Geometry|{{uc:relativeDirTo}}]]
[[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 14: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