BIS fnc relPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Some wiki formatting)
 
(21 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


|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.}}|DESCRIPTION=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


|[start, distance, direction] call '''BIS_fnc_relPos'''|SYNTAX=
|game4= arma3
|version4= 0.50


|p1= start: [[Object]] or [[Position]] - Object or position which should be used as initial point.|PARAMETER1=
|gr1= Positions


|p2= distance: [[Number]] - Distance from initial point.|PARAMETER2=
|gr2= Geometry


|p3= direction: [[Number]] - Direction from the intial position.|PARAMETER3=
|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#Syntax 3|alternative syntax]] instead.}}


|[[Position]]|RETURNVALUE=
|s1= [origin, distance, direction] call [[BIS_fnc_relPos]]
____________________________________________________________________________________________


|x1= <code>[ [0,0,0], 1000, 50 ] [[call]] '''BIS_fnc_relPos''';//[766.044,642.788,0]</code> |EXAMPLE1=
|p1= origin: [[Object]] or [[Position]] - object or position which should be used as initial point.
____________________________________________________________________________________________


|[[getPos]]|SEEALSO=
|p2= distance: [[Number]] - distance from initial point
}}


<h3 style="display:none">Notes</h3>
|p3= direction: [[Number]] - direction from the intial position
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|r1= [[Position]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>[[0,0,0], 1000, 50] call BIS_fnc_relPos; // [766.044,642.788,0]</sqf>
[[Category:Function Group: Geometry|{{uc:relPos}}]]
[[Category:Functions|{{uc:relPos}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:relPos}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:relPos}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:relPos}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:relPos}}]]


<!-- CONTINUE Notes -->
|seealso= [[getPos]]
<dl class="command_description">
}}
<dd class="notedate">Posted on January 7, 2016 - 19:26 (UTC)</dd>
<dt class="note">[[User:Lawman Actual|Lawman Actual]]</dt>
<dd class="note">


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.
{{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.


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.
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.
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 14:07, 13 July 2022

Hover & click on the images for description

Description

Description:
Returns a position that is a specified distance and compass direction from the passed position or object.
Arma 3
In Arma 3 use getPos' alternative syntax instead.
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:
[[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
Lawman Actual - c
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.