Animation in place without locking rotation

Hi, I’m trying to make my character front flip, but at the end of the animation, he teleports back. I think it has something to do with root motion, but if I lock it he just stays in place and doesn’t flip. He moves his arms and legs though.

Hi. What do you mean “teleport”? Do you mean he lands in exactly the same place he started from but the animation requires that he move forward? Can you describe it better or show a video?

He goes back to where his capsule and other things are. The animation moves, so if you sit in one place it looks like he moves while performing the animation, but goes back to the original spot after the animation.

So I think it’s a root motion animation but the animation isn’t driving the capsule. You have two options.

You can use root motion in your character but there are limitations (like no online multiplayer). I steer clear of root motion but I think you enable it by going into your character’s AnimBP and changing “Root Motion Mode” to “Root Motion from Everything”. That means all the animations need to use root motion though.

Your other option is to use animations without root motion and move the pawn yourself. This is done by calling functions of the CharacterMovementComponent (i.e. AddImpulse and AddForce).

Can you send me a screenshot of where I would change the root motion mode?

Wait I found it. It doesn’t seem to do anything. https://drive.google.com/open?id=1KeHOFPuKd7nFEfiEuFC6m1Ia9eFf7jgz

https://drive.google.com/open?id=1H2vvGNOYgUq3_shwBQUVQZs0bMyE1FSa

I’m probably wrong about my first suggestion. If you’re just doing a flip then you can do it as a montage and keep “Root Motion Mode” set to “Root Motion from Montage Only”. Are you using a montage?

Have you looked at the tutorials on YouTube? There seem to be a lot of them. Even if you put your project aside and implement what they do in their videos, it might help you get familiar with the system. Then you can go back to your project and do it from a position of knowledge – and maybe teach me a thing or two.

What is montage?

I guess that answers my question. Search for “UE4 animation montage tutorial” on YouTube. Epic has a good tutorial but it’s pretty old so some things will be in different places. But there are many others. They will be able to teach you better than I can here. Once you have your animation running as a montage then the root motion can kick in.