WorldToScreen: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|WorldToScreen(loc.X, loc.Y, loc.Z)}} {{FuncParameters}} {{FuncParam|loc.X|__EDIT_ME__}} {{FuncPara...")
 
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


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


{{FuncSyntax|WorldToScreen(loc.X, loc.Y, loc.Z)}}
{{FuncSyntax|WorldToScreen(x, y, z)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|loc.X|__EDIT_ME__}}
{{FuncParam|x|Coordinate X in world space.}}
{{FuncParam|loc.Y|__EDIT_ME__}}
{{FuncParam|y|Coordinate Y in world space.}}
{{FuncParam|loc.Z|__EDIT_ME__}}
{{FuncParam|z|Coordinate Z in world space.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Multiple 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 ==
== Example ==

Revision as of 10:07, 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 Value

  • Multiple 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__