Walk cycle moving, to walk cycle in-place

So my friend make a walk cycle for my character. But it moves forward, which is unsuitable for it to be put in blend space.

I solve it by moving the world controller back with the exact translate z of the character. It works in marmoset, but when i export it into unreal the mesh still moves forward. Any solution? Maybe theres something wrong with the animation baking in maya?

when you go to the animation in Unreal, try enabling root motion.

https://docs.unrealengine.com/portals/0/images/Engine/Animation/RootMotion/RootMotion.png

you can read more about it here https://docs.unrealengine.com/en-us/Engine/Animation/RootMotion might be your solution

when you go to the animation in Unreal, try enabling root motion.

https://docs.unrealengine.com/portals/0/images/Engine/Animation/RootMotion/RootMotion.png

you can read more about it here https://docs.unrealengine.com/en-us/Engine/Animation/RootMotion might be your solution