{"name":"visiblePosition","operator":null,"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","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.60"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.60"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"name of the object","types":["Object"],"since":null,"text":"object: Object - name of the object"}],"returns":{"type":"PositionAGLS","types":["PositionAGLS"],"description":null,"text":"PositionAGLS"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}}],"examples":[{"text":"```sqf\n_playerRenderedPos = visiblePosition player;\n```","code":["_playerRenderedPos = visiblePosition player;"]}],"multiplayer":null,"problems":null,"aliases":[],"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.\n\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```"}],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Positions","Command Group: Render Time Scope","Introduced with Arma 2: Operation Arrowhead version 1.60","Scripting Commands","Take On Helicopters: Scripting Commands"]}