BIS fnc relPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(page filling, comment cleanup)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


|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
|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=
____________________________________________________________________________________________
____________________________________________________________________________________________


|[start, distance, direction] call '''BIS_fnc_relPos'''|= Syntax
|[start, distance, direction] call '''BIS_fnc_relPos'''|SYNTAX=


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


|p2= distance: [[Number]] - Distance from initial point.|= Parameter 2
|p2= distance: [[Number]] - Distance from initial point.|PARAMETER2=


|p3= direction: [[Number]] - Direction from the intial position.|= Parameter 3
|p3= direction: [[Number]] - Direction from the intial position.|PARAMETER3=


|[[Position]]|= Return value
|[[Position]]|RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[ [0,0,0], 1000, 50 ] [[call]] '''BIS_fnc_relPos''';//[766.044,642.788,0]</code> |= Example 1
|x1= <code>[ [0,0,0], 1000, 50 ] [[call]] '''BIS_fnc_relPos''';//[766.044,642.788,0]</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


|[[getPos]]|= See also
|[[getPos]]|SEEALSO=
}}
}}



Revision as of 15:32, 7 April 2019

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 instead.
Execution:
call
Groups:
Uncategorised

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

Notes

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.