BIS fnc relPos: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{ *cc*\| *([^}]+) *\}\}" to "// $1") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 18: | Line 18: | ||
|descr= Returns a position that is a specified distance and compass direction from the passed position or object. | |descr= Returns a position that is a specified distance and compass direction from the passed position or object. | ||
{{Feature|arma3|In {{arma3}} use [[getPos]]' [[getPos# | {{Feature|arma3|In {{arma3}} use [[getPos]]' [[getPos#Syntax 3|alternative syntax]] instead.}} | ||
|s1= [origin, distance, direction] call [[BIS_fnc_relPos]] | |s1= [origin, distance, direction] call [[BIS_fnc_relPos]] | ||
Line 30: | Line 30: | ||
|r1= [[Position]] | |r1= [[Position]] | ||
|x1= < | |x1= <sqf>[[0,0,0], 1000, 50] call BIS_fnc_relPos; // [766.044,642.788,0]</sqf> | ||
|seealso= [[getPos]] | |seealso= [[getPos]] | ||
}} | }} | ||
{{Note | |||
|user= Lawman Actual | |||
|timestamp= 20160107192600 | |||
|text= 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. | |||
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 rangefinder (which is measuring in 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. | However, if there is a significant change in elevation between yourself and the target, the distance registered on a rangefinder (which is measuring in 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. | Currently searching for a method which incorporates the azimuth of the rangefinder in calculation. | ||
}} | |||
Latest revision as of 14:07, 13 July 2022
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:
- [origin, distance, direction] call BIS_fnc_relPos
- Parameters:
- origin: 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:
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
- Posted on Jan 07, 2016 - 19:26 (UTC)
- 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 rangefinder (which is measuring in 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.