Skip to content

format

typescript
Camera.ViewportPointToScreen(point)

class: Camera

description

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

parameter

param_nametypedescription
pointVector3The viewport coordinates.

reture

typedescription
Vector3The converted screen coordinates.

code example

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