How do you get a walk forward animation to loop and maintain forward movement?

I’m imported a walk forward animation from Blender into Unity that moves the rigged player character but the model resets back to the original position of the animation. Setting it to Loop in the FBX just causes the model to walk in place without moving.

So, my question is how do I loop this walk animation but have it maintain the forward movement? I see every tutorial on Mecanim is doing this but they don’t explain how it’s done. I’m pretty sure they all don’t have walk animations that are like 1,000 frames long or something like that.

When people make their looped animations they don’t add the forward movement in with it. Generally the forward movement is controlled via the character controller, which controls the animated mesh that’s parented to it. So all forward motion is handled with code.

Not necessarily. Mecanim as a system is expecting there to be root translation to tell it what the offsets are; it is, by design, a system that looks for the aniamtion to have the motion on the root node. It’s true that one could put purely code driven physics, but it’s not how Mecanim is designed.

To answer the original poster’s questions, one thing to do is to put your forward motion on the root node, by itself, and bake it into the animation before exporting the FBX. When you do it should use that as a reference as to where to start the loop over, displacing the character properly. If you put this on the wrong node (say on the hips, rather than the root), you’ll see the guy run forward, then pop back to the origin on the loop.