using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Fly : MonoBehaviour
{
public List<Transform> gameOjbet_tran = new List<Transform>();
public List<Vector3> point = new List<Vector3>();
public GameObject ball;
public float Speed = 1;
public float Time1 = 0.1f;
private float Timer = 0;
int i = 1;
public float pointNum=100;
public AnimationCurve curve;
// Use this for initialization
void Init()
{
point = new List<Vector3>();
for (int i = 0; i < pointNum; i++)
{
//一
Vector3 pos1 = Vector3.Lerp(gameOjbet_tran[0].position, gameOjbet_tran[1].position, i / pointNum);
Vector3 pos2 = Vector3.Lerp(gameOjbet_tran[1].position, gameOjbet_tran[2].position, i / pointNum);
Vector3 pos3 = Vector3.Lerp(gameOjbet_tran[
unity三次样条曲线的简单实现
最新推荐文章于 2024-10-15 21:06:13 发布