So, I have a mixamo animation, that I’ve added root motion to. This is being applied to the ue4 mannequin. This has worked on other animations just fine. So as far as I know the root motion is working correctly. Other leaps and things like this seem to work and carry the capsule with it, so I don’t think this is related to anything regarding the root motion itself.
The issue I do have is this: the character should take a couple swipes, then do a 360 degree leap spin slash as a finishing move. In anim preview, with root motion on and processing it, it looks perfectly fine. however in the game, he does something weird. he just spins out of control on the spin itself.
I have the anim notify set up to enable flying right before he leaps, and disable it right after. I read that you need to enable flying to use Z location in root motion. This works fine on another animation I tried (a straight leap) but on this one that spins it goes crazy:
He has some other notifications in there, to enable damage on his weapon as he swings it around for each slash. But you can see notifications where he starts the leap (flying) , finishes the leap (falling), and a somewhat hidden notification walk that sets him back to walk. This seems to work fine on an animation that simply leaps high and forward.
Here is an additional video that shows the animation both working and not working: - YouTube Something about jumping away from the AI while it is in the middle of that animation makes it go crazy, but there is nothing that I can see in my code that changes. I specifically put a check in the behaviour tree that checks for distance with player to do an OR bool on if the melee animation is playing. And if it is, don’t fail, just to make sure that’s not it, and looking at the tree it doesn’t seem to be.