BIS fnc relPos: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|arma2 | |arma2 | ||
|1.00 | |1.00 | ||
|gr1 = Positions | |gr1 = Positions | ||
|gr2 = Geometry | |gr2 = Geometry | ||
|Returns a position that is a specified distance and compass direction from the passed position or object. {{Feature|arma3|In Arma 3 use [[getPos]] instead.}} | |Returns a position that is a specified distance and compass direction from the passed position or object. {{Feature|arma3|In Arma 3 use [[getPos]] instead.}} | ||
|[start, distance, direction] call '''BIS_fnc_relPos''' | |[start, distance, direction] call '''BIS_fnc_relPos''' | ||
|p1= start: [[Object]] or [[Position]] - Object or position which should be used as initial point. | |p1= start: [[Object]] or [[Position]] - Object or position which should be used as initial point. | ||
|p2= distance: [[Number]] - Distance from initial point. | |p2= distance: [[Number]] - Distance from initial point. | ||
|p3= direction: [[Number]] - Direction from the intial position. | |p3= direction: [[Number]] - Direction from the intial position. | ||
|[[Position]] | |[[Position]] | ||
|x1= <code>[ [0,0,0], 1000, 50 ] [[call]] '''BIS_fnc_relPos''';//[766.044,642.788,0]</code> | |x1= <code>[ [0,0,0], 1000, 50 ] [[call]] '''BIS_fnc_relPos''';//[766.044,642.788,0]</code> | ||
|[[getPos]] | |[[getPos]] | ||
}} | }} | ||
Revision as of 23:39, 17 January 2021
Description
- Description:
- Returns a position that is a specified distance and compass direction from the passed position or object.
- Execution:
- call
- Groups:
- PositionsGeometry
Syntax
- Syntax:
- [start, distance, direction] call BIS_fnc_relPos
- Parameters:
- start: Object or Position - Object or position which should be used as initial point.
- distance: Number - Distance from initial point.
- direction: Number - Direction from the intial position.
- Return Value:
- Position
Examples
- Example 1:
[ [0,0,0], 1000, 50 ] call BIS_fnc_relPos;//[766.044,642.788,0]
Additional Information
- See also:
- getPos
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
Bottom Section
- Posted on January 7, 2016 - 19:26 (UTC)
- Lawman Actual
- The function appears to work in two dimensions, and as such can be used to find the position of a target relative to the player if bearing and distance are known. However, if there is a significant change in elevation between yourself and the target, the distance registered on a ragefinder (which is measuring a 3 dimensional straight line) will always be larger than the two-dimensional value required for BIS_fnc_relPos and as such air-strikes and ordnance called in using such a function can miss by several hundred metres in extreme cases. Currently searching for a method which incorporates the azimuth of the rangefinder in calculation.