Arma 3 Scripting

Command in Positions

screenToWorldDirection

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

Description

Returns the 3D vector in world corresponding to the given point on the screen (in UI coordinates), as if the vector was aiming from the camera to the screen position.

Syntax

Syntax 1

screenToWorldDirection screen

Parameters:

Returns: Vector3D - world vector

Syntax 2

camera screenToWorldDirection position

Parameters:

Returns: Vector3D - world vector

Examples

Example 1

private _vec = screenToWorldDirection [0.5, 0.5]; // a vector pointing to the front of the camera

See also

SafeZone · worldToScreen · screenToWorld