getRelDir: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "Position3D" to "Position3D") |
Lou Montana (talk | contribs) |
||
Line 17: | Line 17: | ||
|x1= <code>_reldir = [[player]] '''getRelDir''' tank;</code> | |x1= <code>_reldir = [[player]] '''getRelDir''' tank;</code> | ||
|seealso= [[getDir]] | |seealso= [[getDir]] [[direction]], [[getDirVisual]] | ||
}} | }} | ||
Revision as of 16:05, 20 January 2022
Description
- Description:
- Returns direction, which is relative to object's current direction, from given object to another object or position in the range from 0 to 360, the equivalent of BIS_fnc_relativeDirTo. Taking the current direction of the object into account.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- object getRelDir position
- Parameters:
- object: Object
- position: Object, Position2D or Position3D
- Return Value:
- Number
Examples
- Example 1:
_reldir = player getRelDir tank;
Additional Information
- See also:
- getDir directiongetDirVisual
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
- Posted on August 7, 2018 - 21:50 (UTC)
- Tankbuster
- To clarify, this returns a relative direction, so objects directly in front are said to be at zero degrees. So, taking example 1 above, if the tank is in front of the player, this function will return 0. If the tank is to the right of the player, it will return 90.