ViewportPointToRay

Method

ViewportPointToRay has 2 overloads.

ViewportPointToRay(Vector3)

Returns a ray going from camera through a viewport point. Unity docs

Definition

Ray ViewportPointToRay(Vector3 pos)
Ray ViewportPointToRay(Vector3 pos)

Returns Ray

Parameters

ParameterDescription
Vector3 pos

ViewportPointToRay(Vector3, MonoOrStereoscopicEye)

Returns a ray going from camera through a viewport point. Unity docs

Definition

Ray ViewportPointToRay(Vector3 pos, Camera.MonoOrStereoscopicEye eye)
Ray ViewportPointToRay(Vector3 pos, Camera.MonoOrStereoscopicEye eye)

Returns Ray

Parameters

ParameterDescription
Vector3 pos
MonoOrStereoscopicEye eye