ScreenToWorld

From Onset Developer Wiki
Revision as of 11:26, 1 September 2020 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
ScreenToWorld

Type: Function
Context: Client
Introduced: v1.0

Description

Deprojects a 2D screen space into 3D world space.

Syntax

ScreenToWorld(x, y)

Parameters

  • x
    Screen X coordinate.
  • y
    Screen Y coordinate.

Return Values

  • bResult: True on success, False on error.
  • X: World space X coordinate.
  • Y: World space Y coordinate.
  • Z: World space Z coordinate.
  • DirectionX: World space direction X coordinate away from the camera at the given 2d point.
  • DirectionY: World space direction Y coordinate away from the camera at the given 2d point.
  • DirectionZ: World space direction Z coordinate away from the camera at the given 2d point.

Example

__EDIT_ME__

See also