WorldToViewportPoint

Method

WorldToViewportPoint has 2 overloads.

WorldToViewportPoint(Vector3)

Transforms position from world space into viewport space. Unity docs

Definition

Vector3 WorldToViewportPoint(Vector3 pos)
Vector3 WorldToViewportPoint(Vector3 pos)

Returns Vector3

Parameters

ParameterDescription
Vector3 pos

WorldToViewportPoint(Vector3, MonoOrStereoscopicEye)

Transforms position from world space into viewport space. Unity docs

Definition

Vector3 WorldToViewportPoint(Vector3 pos, Camera.MonoOrStereoscopicEye eye)
Vector3 WorldToViewportPoint(Vector3 pos, Camera.MonoOrStereoscopicEye eye)

Returns Vector3

Parameters

ParameterDescription
Vector3 pos
MonoOrStereoscopicEye eye