format
typescript
Camera.ViewportPointToWorld(point)class: Camera
description
Converts the viewport coordinates of the current camera to world coordinates.
parameter
| param_name | type | description |
|---|---|---|
| point | Vector3 | The viewport coordinates. |
reture
| type | description |
|---|---|
Vector3 | The converted world coordinates. |
code example
typescript
let camera = this.gameObject.GetComponent<Camera>(Camera);
camera.ViewportToWorld(new Vector3(1,1,1));