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
- WebGL build dependencies are not refreshed until the Editor is restarted
- “Audio Random Container” allows adding unlimited number in “Audio Clips” numeric field, causing Editor to freeze
- In Deferred rendering path, mixed lights don't render when enabling "Use Rendering Layers" in the Decal renderer feature
- [Windows] Special characters in file names are sorted to the end of the alphabet in the Project window
- Information box icons are not contained within the information box bounds in Render Pipeline Converter window
Add comment