ScreenToWorld: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|ScreenToWorld(x, y)}} {{FuncParameters}} {{FuncParam|x|__EDIT_ME__}} {{FuncParam|y|__EDIT_ME__}}..." |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Deprojects a 2D screen space into 3D world space.}} | ||
{{FuncSyntax|ScreenToWorld(x, y)}} | {{FuncSyntax|ScreenToWorld(x, y)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|x| | {{FuncParam|x|Screen X coordinate.}} | ||
{{FuncParam|y| | {{FuncParam|y|Screen Y coordinate.}} | ||
{{ | {{FuncReturnValues}} | ||
* 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 == | == Example == | ||
Line 15: | Line 22: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[WorldToScreen]] |
Latest revision as of 11:26, 1 September 2020
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__