{"name":"getRelPos","title":"getRelPos","type":"command","url":"https://community.bistudio.com/wiki/getRelPos","revid":377397,"updated":"2026-01-02T06:44:48Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","locality":{"argument":"global"},"description":"Returns position that is given distance and relative direction away from original object. The alternative syntax available from Arma 3 v 2.14, returns the position offset of the attached object. If the animated memory point is used for attachment, the offset is calculated in render scope.","syntaxes":[{"syntax":"object getRelPos [distance, direction]","params":[{"name":"object","type":"Object","description":"object","type_expr":"Object"},{"name":"distance","type":"Number","description":"distance from object","type_expr":"Number"},{"name":"direction","type":"Number","description":"direction relative to object's current direction","type_expr":"Number"}],"returns":{"type":"PositionAGL","type_expr":"PositionAGL"},"form":"binary","left":{"text":"object"},"right":{"text":"[distance, direction]"}},{"syntax":"obj1 getRelPos obj2","since":"arma3 2.14","params":[{"name":"obj1","type":"Object","description":"parent object","type_expr":"Object"},{"name":"obj2","type":"Object","description":"attached object","type_expr":"Object"}],"returns":{"type":"PositionRelative","type_expr":"PositionRelative"},"form":"binary","left":{"text":"obj1"},"right":{"text":"obj2"}}],"examples":[{"text":"Find position 100 metres away at player's 3 o'clock:\n\n```sqf\n_relpos = player getRelPos [100, 90];\n```","code":["_relpos = player getRelPos [100, 90];"]}],"see_also":["getPos","getPosASLVisual","getPosATLVisual","visiblePositionASL","visiblePosition","position","getPosATL","getPosASL","getPosASLW"],"notes":[{"user":"talkingtoaj","date":"2016-03-03T15:53:00Z","text":"getPos vs getRelPos: getRelPos operates similarly to getPos except in getRelPos the direction is calculated 'relative' to the current object direction whereas getPos's direction is from North. Thus while getPos can take a position array as it is starting point, getRelPos requires an object with its own azimut heading."}]}