Arma 3 Scripting

visiblePosition

  • Arma 3 v0.50
  • First in Arma 2: Operation Arrowhead v1.60

Command · also in Render Time Scope · Markdown · JSON · original wiki page

Description

Returns an object's rendered position (z value above surface underneath) in render time scope. Same as getPosVisual.

Important

This command must not be used for actual 3D calculations. See getPos for an explanation.

Syntax

visiblePosition object

Parameters:

Returns: PositionAGLS

Examples

Example 1

_playerRenderedPos = visiblePosition player;

See also

getPosVisual · getPosATLVisual · getPosASLVisual · getPosWorldVisual · visiblePositionASL · position · getPos · getPosATL · getPosASL · getPosASLW

Community notes

Leopard20

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.
For 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:

ASLToAGL getPosWorldVisual _object        // object center in model coordinates, i.e [0,0,0]
ASLToAGL getPosASLVisual _object        // object land contact (e.g. floor of a building)
unitAimPositionVisual _object            // object's aiming position, i.e where the AI aim at, such as a soldier's chest
_object modelToWorldVisual _relativePos    // custom position in model coordinates. if _relativePos is [0,0,0], it'll be the same as ASLToAGL getPosWorldVisual _object