Search Issue Tracker
Fixed in 5.1.0
Votes
0
Found in
4.2.0f4
Issue ID
559723
Regression
No
AnimationCurve created by script has a very steep transition
When creating an animation by code (add KeyFrame to AnimationClip then finally add AnimationClip to Animation and Play() ) if making a keyframe for "rotation" you will get a special keyframe that will have a sharp broken at the middle of 2 keyframes.
2) How can we reproduce it using the example you attached
Try this on a GameObject that has Animation component attached
AnimationClip dieAnimation = new AnimationClip();
AnimationCurve rotationCurve = new AnimationCurve();
rotationCurve.AddKey(new Keyframe(0.5f,0.3f,0,0));
rotationCurve.AddKey(new Keyframe(1,0,0,0));
dieAnimation.SetCurve("",typeof(Transform),"localRotation.z",rotationCurve);
animation.AddClip(dieAnimation,"dieAnimation");
animation.Play("dieAnimation");
At runtime check the newly created AnimationClip in the Animation Editor to see that the light-blue keyframe belongs to localRotation.z has a very weird shape. Try drag around for a weirder shape. (If the two are really close, the shape will be ok)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment