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)); }
public static Vector3 Velocity(Spline.Path pts, float t, EasingType ease, bool easeIn) { return(Spline.Velocity(pts, t, ease, easeIn, true)); }
public static Vector3 Velocity(Spline.Path pts, float t) { return(Spline.Velocity(pts, t, EasingType.Linear)); }