Graphics::world3dToScreen2d: Difference between revisions

From RAGE Multiplayer Wiki
m (Cleaned up page.)
No edit summary
Line 1: Line 1:
Convert a world coordinate into its relative screen coordinate.  (WorldToScreen)<br>
Convert a world coordinate into its relative screen coordinate.  (WorldToScreen)<br>
Will return undefined if the given coordinate isn't in view.


==Syntax==
==Syntax==
Line 10: Line 9:
===Return value===
===Return value===
*'''object:''' x, y
*'''object:''' x, y
*OR '''undefined''' if the given coordinate is not in view.
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Revision as of 00:31, 27 June 2018

Convert a world coordinate into its relative screen coordinate. (WorldToScreen)

Syntax

mp.game.graphics.world3dToScreen2d(new mp.Vector3(worldX, worldY, worldZ));

Required Arguments

  • worldX: float
  • worldY: float
  • worldZ: float

Return value

  • object: x, y
  • OR undefined if the given coordinate is not in view.

Example

// todo

See also