Graphics::screen2dToWorld3d: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 9: Line 9:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
let pos3d = mp.game.graphics.screen2dToWorld3d(new mp.Vector3(0.5, 0.5, 0));
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==

Revision as of 15:21, 27 July 2018

Returns world position from screen position

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(0.5, 0.5, 0));

See also