From 05ab625a01795b58c83408f686fc42327c8f1eeb Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Sat, 8 Feb 2020 09:57:05 -0500 Subject: [PATCH] Quick fix for animation interpolation --- Switch_Toolbox_Library/Animations/Animation.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Switch_Toolbox_Library/Animations/Animation.cs b/Switch_Toolbox_Library/Animations/Animation.cs index e8dcbc2f..2ac97912 100644 --- a/Switch_Toolbox_Library/Animations/Animation.cs +++ b/Switch_Toolbox_Library/Animations/Animation.cs @@ -335,18 +335,7 @@ namespace Toolbox.Library.Animations case InterpolationType.STEP: return LK.Value; case InterpolationType.LINEAR: return InterpolationHelper.Lerp(LK.Value, RK.Value, Weight); case InterpolationType.HERMITE: - // return InterpolationHelper.GetCubicValue(Weight, LK.Value, LK.Slope1, LK.Slope2, LK.Delta); - // return CubicEval(LK.Value, LK.Slope1, LK.Slope2, LK.Delta, ratio); - float length = RK.Frame - LK.Frame; - - float val = InterpolationHelper.HermiteInterpolate(frame, - LK.Frame, - RK.Frame, - RK.Slope1, - LK.Slope2, - LK.Value, - RK.Value); - + float val = Hermite(frame, LK.Frame, RK.Frame, LK.In, LK.Out != -1 ? LK.Out : RK.In, LK.Value, RK.Value); return val; } }