Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.4

Description

Description:

Returns the cursor / crosshairs position for the player in screen coordinates (upper left: [0, 0], lower right: [1, 1]). The center of the screen is [0.5, 0.5], but if the "Floating Zone" in the controls options has been set to a value higher than 0, then the cursor values may vary considerably, and can then be interpreted using this command.

If the unit is inside a vehicle, then [0.5, 0.5] is returned (in V3.5+, when using personal weapons from inside a vehicle, the correct screen position is returned).

Works for armed or unarmed units.

Syntax

Syntax:aimPos2D
Parameters:
Return Value:Array - Current cursor position.

Examples

Examples:
_aim = aimPos2D

Additional Information

See also: aimPos, aimedAtTarget, worldToScreen
Multiplayer: 
Problems: 

Notes