{"name":"BIS_fnc_relPos","title":"BIS fnc relPos","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_relPos","revid":327958,"updated":"2022-07-13T13:07:01Z","groups":["Positions","Geometry"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns a position that is a specified distance and compass direction from the passed position or object.\n\n> [!NOTE]\n> **Arma 3:** In Arma 3 use getPos' alternative syntax instead.","syntaxes":[{"syntax":"[origin, distance, direction] call BIS_fnc_relPos","params":[{"name":"origin","type":"Object or Position","description":"object or position which should be used as initial point.","type_expr":"Object | Position"},{"name":"distance","type":"Number","description":"distance from initial point","type_expr":"Number"},{"name":"direction","type":"Number","description":"direction from the intial position","type_expr":"Number"}],"returns":{"type":"Position","type_expr":"Position"}}],"examples":[{"code":["[[0,0,0], 1000, 50] call BIS_fnc_relPos; // [766.044,642.788,0]"]}],"see_also":["getPos"],"notes":[{"user":"Lawman Actual","date":"2016-01-07T19:26:00Z","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.\n\nHowever, 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.\n\nCurrently searching for a method which incorporates the azimuth of the rangefinder in calculation."}]}