Mecanim loop pose

I have a character with a walk and a run animation. I export the walk and run animation as separate FBX files and then import them into Unity. The character is set up as a biped humanoid character and the animation files get their avatar data from the same base avatar.

The run animation has the same start and end frame (frame 0 start and frame 16 end). Looking in my animation package these frames are identical. I have set up the animation clip in Unity with the start frame of 0 and end frame of 15. Setting the start and end frame to be the exact same frame produces a hitch when looping since the same frame is played twice. With the start frame of 0 and end frame of 15 and loop pose activated it loops without a hitch - however - Mecanim seem to be distributing and try to compensating the looping throughout the rest of my run animation clip and not just the frame where the animation loops. This results in my character not animating as intended, he rotates one foot slightly and fails to lift one of his legs as high as he should.

Now, I have read through everything I could find regarding loop pose and it seems like I’m not the only one with this issue. However I have failed to find any solution that works for me. Turning off mecanim and setting the animation type to legacy produces none of the same problems - the animation seems to play flawlessly and loops fine. Turning of loop pose plays back the animation without the unintended problems but it seems to hitch at the end of the animation where it would otherwise loop perfectly.

My walk animation has none of these problems. It loops using loop pose and plays the animation without any compensating going on throughout the clip.

I’m going crazy trying to solve this problem and I really want to keep using Mecanim because I like it a lot. Please, someone help me. :slight_smile:

Ok, so this “hitch” in my case, was caused because i overlooked the frame rate unity presented us when tweaking the start and end times… ie, 1 unit is not 1 frame… So what i waaaas doing, was subtracting 1 to remove the overlapping frame, thus making it loop seamlessly without pause, but because I’m actually subtracting an entire unit (My run cycle ran 24 frames long, and in unity was 8 seconds, so 3 frames per unit) I was actually subtracting 3 frames, not 1, which caused a slight hitch, in which my anim didn’t fully play and was cut short and smoothed over. So instead of subtracting 1, I subtrated 0.33 (8/24) or 1 frame, and the anim ran smoothly, without a hitch.

Why in the world unity doesn’t present us with the standard units as frames, and just let us choose the playback rate intended for the animation, instead of trying to force 30FPS and give us a standard 10th of a second unit is beyond me… I’m likely missing something but to me it seems ridiculous…