예제 #1
0
        public static void GizmoDraw(Vector3[] pts, float t, EasingType ease, bool easeIn, bool easeOut)
        {
            Gizmos.color = Color.white;
            Vector3 to = Spline.Interp(pts, 0f);

            for (int i = 1; i <= 20; i++)
            {
                float   t2     = (float)i / 20f;
                Vector3 vector = Spline.Interp(pts, t2, ease, easeIn, easeOut);
                Gizmos.DrawLine(vector, to);
                to = vector;
            }
            Gizmos.color = Color.blue;
            Vector3 vector2 = Spline.Interp(pts, t, ease, easeIn, easeOut);

            Gizmos.DrawLine(vector2, vector2 + Spline.Velocity(pts, t, ease, easeIn, easeOut));
        }
예제 #2
0
 public static Vector3 Velocity(Spline.Path pts, float t, EasingType ease, bool easeIn)
 {
     return(Spline.Velocity(pts, t, ease, easeIn, true));
 }
예제 #3
0
 public static Vector3 Velocity(Spline.Path pts, float t)
 {
     return(Spline.Velocity(pts, t, EasingType.Linear));
 }