public Vector3 GetPoint(float t)
    {
        int i;

        if (t >= 1f)
        {
            t = 1f;
            i = points.Length - 4;
        }
        else
        {
            t  = Mathf.Clamp01(t) * CurveCount;
            i  = (int)t;
            t -= i;
            i *= 3;
        }
        return(transform.TransformPoint(CatlikeBezier.GetPoint(points[i], points[i + 1], points[i + 2], points[i + 3], t)));
    }
Esempio n. 2
0
 public Vector3 GetPoint(float t)
 {
     return(transform.TransformPoint(CatlikeBezier.GetPoint(points[0], points[1], points[2], points[3], t)));
 }