- Home /
Why is Unity Adding Extra Frames to Animation?
Unity 3.5.0f1
It makes looping impossible because there is a huge pause at the end of the animation! How can I fix this?
Oh and I should say, YES I tried quitting Unity and starting it back up again.Running on Mac OS X 10.7.3
Answer by Wesww · Jun 06, 2012 at 07:18 PM
The only solution I've found is to delete the animation, make a new one, and then be careful never to create any frames longer than the maximum length the animation is estimated to need.
Answer by Bunny83 · Apr 16, 2012 at 07:26 PM
Because your animation is that long. There might be another curve that has a keyframe at 20:00
All curves have to cover the whole animation length. You can't animate a value just in a sub area of your animation. If a property has an animation curve, it is animated by this curve as long as the animation is playing.
edit
If you're animation is created in Unity, just check all curves. Select at the bottom right "Show: Animated". Now only objects that are animated are shown in the animation-hierarchy-view. Check all objects, there have to be at least one curve that has a keyframe at 20:00
.
If it's an animation created outside Unity I'm not sure what you can do about that. Well you can duplicate the animation so you can edit it inside Unity, but for imported animations that's not recommended since the changes have to be done again when you change the animation outside of Unity.
Hi! Thanks for your help.
The animation is created in Unity. There are no curves at all that have a keyframe past frame 700, approx. 12:00.
I'll upload another screenshot based on what you said!
Any other ideas?
Yre you sure? have you selected each curve? You have 5 curves. The near clip plane and field of view are also animated. Have you selected all 5? Unity doesn't show all curves, only those from the selected object.
I've tried it with an old animation of $$anonymous$$e. When i move the last keyframe to the left i also get the same result. The curves are extended to the "old" end of the animation.
But when I move the last keyframe, the end of the animation moves as well. I had an animation with several child objects and 30+ curves. I'm pretty sure you've missed a curve.
What happens when you insert another keyframe in one of the curves behind 20:00
and then move it to the left. Does the curves get extended to the new end?
Definitely no additional keyframes. I didn't actually need camera range animated either so I deleted that and only have pos now.
When I insert another keyframe in one of the curves behind (to the right of) 20:00, the animation then ends at the new keyframe, but if I move it to the left of 20:00 the ending stays at the same place. Pretty weird! Definitely a Unity bug,
That sounds really strange. I tested it on my old test project which i use for UA. It's still a 3.0 project. I'll test it on 3.5 ...
Answer by Steven-1 · Jul 27, 2012 at 09:23 PM
answered here: http://answers.unity3d.com/questions/250384/how-to-set-the-duration-of-a-looping-animation-fro.html#answer-291763
(in short, use the script found here: http://forum.unity3d.com/threads/131340-Reduce-animationclip-length/page2#post967674)
Answer by richardzzzarnold · Apr 28, 2012 at 11:14 AM
I have found in version 3 that animation lengths are different in mac and pc. If you have made an animation in maya at 24 fps on pc and import to unity it will change length in 5:4 ratio (24 fps to 30 fps) however if you transfer it to mac it will work properly.
So if you have made an animation of 1-100 in maya when you bring it into unity on pc you would need to change the frames to 1-125 in order to work on it properly howerver if you then move it again to mac you would need to reset all the frame times again to original position dunno if this problem is related to yours but maybe.