WorldToScreen: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 10: Line 10:
{{FuncParam|z|Coordinate Z in world space.}}
{{FuncParam|z|Coordinate Z in world space.}}


{{FuncReturnValue|Multiple return values:
{{FuncReturnValues}}
* bResult: True on success or False if the world location is not on screen.
* bResult: True on success or False if the world location is not on screen.
* ScreenX: Converted screen X coordinate.
* ScreenX: Converted screen X coordinate.
* ScreenY: Converted screen Y coordinate. }}
* ScreenY: Converted screen Y coordinate.


== Example ==
== Example ==

Revision as of 10:33, 2 August 2019

WorldToScreen

Type: Function
Context: Client
Introduced: v1.0

Description

Converts a 3d world location into 2d screen space location. Also returns a bool indicating whether the 3d location is actually on the screen.

Syntax

WorldToScreen(x, y, z)

Parameters

  • x
    Coordinate X in world space.
  • y
    Coordinate Y in world space.
  • z
    Coordinate Z in world space.

Return Values

  • bResult: True on success or False if the world location is not on screen.
  • ScreenX: Converted screen X coordinate.
  • ScreenY: Converted screen Y coordinate.

Example

__EDIT_ME__

See also

__EDIT_ME__