Skip to content

Commit 86ccc3c

Browse files
marwiehybridherbst
authored andcommitted
SpriteSheet Animation: ensure tangent mode is set to constant
https://linear.app/needle/issue/NE-4275
1 parent 17e9ea0 commit 86ccc3c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Runtime/Scripts/SceneExporter/ExporterAnimation.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,11 @@ private void CollectClipCurves(GameObject root, AnimationClip clip, Dictionary<s
11711171
lastKeyframe = kf;
11721172
}
11731173
curve.keys = keyframes.ToArray();
1174+
// Ensure that the curve is constant for spritesheet animation
1175+
for (var i = 0; i < curve.keys.Length; i++)
1176+
{
1177+
AnimationUtility.SetKeyLeftTangentMode(curve, i, AnimationUtility.TangentMode.Constant);
1178+
}
11741179
current.AddPropertyCurves(obj, curve, binding);
11751180
targetCurves[path] = current;
11761181

0 commit comments

Comments
 (0)