ScreenPointToRay(Camera, Vector2)
Transforms a screen space position into a ray.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.UIModule
public static Ray ScreenPointToRay(Camera cam, Vector2 screenPos)
Parameters
Returns
Type | Description |
|---|---|
| Ray | The ray going from camera through the screen point if the camera is given, or from the screen point going forward if no camera is given. |