Hi, as the title suggest i have a question about root motion. Most of my animations work with root motion, but some of them like jumping up that have a translation on Z wont work. How do i get them to work properly? There are no further options for root motion at all.
Root motion will apply to Z, but only if the player is in a flying state.
If you want to do this, my advice is to create a custom NotifyStateBP; when it begins, have it set the player’s movement mode to flying, abd when it ends, have it set it to falling.
Then you just place this notify state to cover any portions of the animation where the player needs to move vertically via root motion. The advantage to using a NotifyState is it will ALWAYS fire its finish function no matter what; if the animation is cancelled or interrupted (say via a MontageStop), the player will not get stuck in a flying movement state by accident.
I actually use this approach for certain melee attacks with complex vertical elements that can’t be handled with Launch functions (not so much for simple jumps and the like, mind you) and it works really well. I have a “VerticalRootMotion” notify state.
With NotifyState u mean Animation Notifications in anim montage?
Thanks for the flying state solution anyhow!
Yes, but not ordinary Notifies. Notify States are the blue duration notifies. By using these rather than regular notifies you don’t have to worry about what happens if the animation is interrupted before the notify which resets the movement mode to falling is reached.
Okay so i tried to apply the fly movement state, but still i see some hopping in animation on z axis. Why?
I also enabled “Can Fly” flag on my movement component, but still vertical root motion is not taken into account.