ScreenPointToRay(Camera, Vector2)
Transforms a screen space position into a ray.
阅读时间1 分钟最后更新于 1 个月前
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. |