public Vector3 begin,end;//起始终止坐标 public float BtoE_time;//用时 float timer,lerp;//计时器和进度值 void Update () { timer += Time.deltaTime; lerp = timer / BtoE_time; transform.position = Vector3.Lerp(begin,end,lerp); }
public Vector3 begin,end;//起始终止坐标 public float BtoE_time;//用时 float timer,lerp;//计时器和进度值 void Update () { timer += Time.deltaTime; lerp = timer / BtoE_time; transform.position = Vector3.Lerp(begin,end,lerp); }