Arma 3 Scripting

Command in Positions

posScreenToWorld

Also available as Markdown and JSON, or read the original wiki page.

Description

Converts map screen coordinates into world coordinates. Unlike ctrlMapScreenToWorld, this command returns world position is format [x, y, 0], otherwise it is identical to it.

Syntax

map posScreenToWorld [x, y]

Parameters:

Returns: Position3D - world position in format [x,y,0]

Examples

Example 1

_worldCoord = _control posScreenToWorld _ScreenCoord;

Example 2

_worldCoord = _control posScreenToWorld [_x, _y];

Example 3

_worldCoord = _control posScreenToWorld [0.5, 0.5];

See also

posWorldToScreen · ctrlMapScreenToWorld · ctrlMapWorldToScreen