Graphics::screen2dToWorld3d

From RAGE Multiplayer Wiki

Returns world position from screen position

Inverted function: Graphics::world3dToScreen2d

Syntax

mp.game.graphics.screen2dToWorld3d(coords2d);

Required Arguments

  • Vector3: 2d coord

Return value

  • position: Vector3

Example

let pos3d = mp.game.graphics.screen2dToWorld3d(new mp.Vector3(screenX, screenY, 0));

See also