Root motion solution

New this week

I missed last week’s dev log because the illness got worse. Because of that I haven’t spent much time working on the project. However, crucially I have solved (mostly) my root motion problems.

Root motion solution

My state machine system now supports swapping in and out of root motion per state. This allows my standard root fixed animations such as walking to operate as they use to. There are still some problems such as walking through walls (then teleporting back to the legal position). But this is far progress from nothing functioning at all.

Going forward all animation rigs will possess a root bone that sits on the floor. This bone tracks the position of a more traditional root bone (the hip) but will determine where the floor this. This allows me to have animations that possess verticality without causing positioning problems when blending out of the animation (a problem I had when initially when trying root motion).

A have modified the abstract state machine base to implement this root motion. Now all states have a check box declaring whether or not to use root motion. This allows me to continue using the same architecture even when swapping in and out of root motion.

When in root motion a lot of the navmesh agent’s values are saved then zeroed. I foresee some issues with this saving incorrectly or whatnot, but in my limited testing I couldn’t break it. But its something to keep in mind if I run into problems.

What’s next?

Now that root motion is working properly, I can need to clean up my animations and state machine code. Due to the rapid iteration process some stuff got messy and I should fix that first. After that I can begin fully fleshing out the animations for the first boss.

Leave a comment