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