Skip to content

format

typescript
Camera.ScreenPointToWorld(point)

class: Camera

description

Converts the screen coordinates of the current camera to world coordinates.

parameter

param_nametypedescription
pointVector3The screen coordinates.

reture

typedescription
Vector3The converted world coordinates.

code example

typescript
let camera = this.gameObject.GetComponent<Camera>(Camera);
camera.ScreenPointToWorld(new Vector3(1,1,1));