Перейти к содержанию

Graphics::world3dToScreen2d

Материал из RAGE MP Wiki Archive

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

Inverted function:Graphics::screen2dToWorld3d

Syntax

<syntaxhighlight lang="javascript">mp.game.graphics.world3dToScreen2d(new mp.Vector3(worldX, worldY, worldZ));</syntaxhighlight>

Required Arguments

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

Return value

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

Example

<syntaxhighlight lang="javascript"> // todo </syntaxhighlight>

See also