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
- Incorrectly baking lighting when consecutively loading multiple scenes with individual Baking Sets
- [Android] Crash on startup when Depth Stencil Format is set to S8_UINT
- Multiple errors occur when setting the Render Object Event to AfterRenderingPostProcessing while using STP for Upscaling
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
Add comment