- Home /
Mecanim - run animation not looping properly
Hi guys! Hopefully someone can help us with this!
We've successfully imported a custom mesh/rig into Unity, and got it working with Mecanim, so our character can run and attack at the same time for instance using masks.
The issue we are running into at the moment is that it seems to stutter when playing the run animation, so it will stop whenever it gets to the last frame before looping. It also veers slightly off to the left when its meant to be running directly forward. The rig is baked into position... so that one is really confusing.
We are using root motion, but I've triple checked the animation(made in Blender) and it definitely only travels along one axis.
If anyone has any ideas on what could be wrong, help would be greatly appreciated, as there doesnt seem to be much info out there on this subject, so we are kind of flying blind/trial and erroring. If I haven't given enough info I can post up some pics or even link to a video if needs be.
Also apologies if this has already been covered/come up, couldn't find anything doing a forum search/via tutes and guides
Answer by vinod.kapoor · Aug 22, 2014 at 10:16 AM
I thinkk you have not clamped the frames of your animation properly i.e the start and the end frame are not mentioned properly. There is an option to loop your animation there, may be you you din't tick that option.
I'm pretty sure it is clamped properly.. I made the animation myself, and it was 20 frames. For some reason Unity always wants to start it at -1... Im not sure why. I tried changing it to 0 - 19, but the problem still persists.