Graphics::screen2dToWorld3d
Not available on SYNC MP yet
This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.
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));