Ray 射线

射线的结构描述。

Ray是具有开始点和方向的无穷线。

变量说明
direction射线的方向。
origin射线的原点。
公共函数说明
GetPoint返回射线上指定距离的点。

举例:

  1. using UnityEngine;
  2. using System.Collections;
  3. public class ExampleClass : MonoBehaviour {
  4. public Ray r;
  5. void Example() {
  6. print(r.GetPoint(10));
  7. }
  8. }

?