Skip to main content

Graphics::world3dToScreen2d

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

Inverted function:[Graphics::screen2dToWorld3d](/graphics-screen2dtoworld3d)

Syntax

```js 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

```js // todo ```

See also