Arma 3 Scripting

screenToWorldDirection

  • Arma 3 v2.18

Command · Markdown · JSON · 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