{"name":"visiblePosition","title":"visiblePosition","type":"command","url":"https://community.bistudio.com/wiki/visiblePosition","revid":363616,"updated":"2024-04-08T11:45:05Z","groups":["Positions","Render Time Scope"],"status":"ok","games":{"arma2oa":"1.60","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.60","arma3_since":"0.50","description":"Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual.\n\n> [!IMPORTANT]\n> This command must **not** be used for actual 3D calculations. See getPos for an explanation.","syntaxes":[{"syntax":"visiblePosition object","params":[{"name":"object","type":"Object","description":"name of the object","type_expr":"Object"}],"returns":{"type":"PositionAGLS","type_expr":"PositionAGLS"},"form":"unary","right":{"text":"object"}}],"examples":[{"code":["_playerRenderedPos = visiblePosition player;"]}],"see_also":["getPosVisual","getPosATLVisual","getPosASLVisual","getPosWorldVisual","visiblePositionASL","position","getPos","getPosATL","getPosASL","getPosASLW"],"notes":[{"user":"Leopard20","date":"2022-01-26T15:15:06Z","text":"Note that this command returns the position in AGLS format (Z is measured from the nearest surface below). For example the value of Z is 0 even if the object is resting on top of a building.\nFor use with draw commands, such as drawIcon3D, an AGL position is needed. The following alternatives can be used, depending on where the icon is intended to be shown:\n\n```sqf\nASLToAGL getPosWorldVisual _object        // object center in model coordinates, i.e [0,0,0]\nASLToAGL getPosASLVisual _object        // object land contact (e.g. floor of a building)\nunitAimPositionVisual _object            // object's aiming position, i.e where the AI aim at, such as a soldier's chest\n_object modelToWorldVisual _relativePos    // custom position in model coordinates. if _relativePos is [0,0,0], it'll be the same as ASLToAGL getPosWorldVisual _object\n```"}]}