public class GTool{
// 计算抛物线
static public Vector3 getPoint(Vector3 start,Vector3 end,float t, float hight){
Vector3 value = Vector3.Lerp (start, end,t); // x z 轴上的线性位移
value.y = Mathf.Lerp(0,hight,Mathf.Sin(t*Mathf.PI)); // y 轴上的sin 抛物线位移
return value;
}
}
public class Main : MonoBebavior{
代码计算抛物线
最新推荐文章于 2021-09-04 17:42:05 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)