Download

Root motion animation (question about jump sequence)

Hi guys,

I have been following a few tutorials to build my own Root Motion Animation template (for my personal use) using animations from the **AnimStarterPack **and MOCAP Online Mobility Pro packs. So far my basic locomotion is ‘OK’ so jogging and running looks and feels right thanks to following the steps of the root motion animation system by Filmstorm.

However, I haven’t been able to nail the mechanics of JUMPING while using root motion and my jump animations are a bit clunky. For starters, every time I jump (either jogging or running) the character seems to do some funny moves with his feet before jumping and after landing (guessing is trying to jump/land with a specific foot and never matches my input). On top of that, the running jump animation looks very weird, like it doesn’t quite follow the physics that the animation intended. I have included a video below for illustration.

https://www.youtube.com/embed/DhTTfFZQl3Q

Any help on this would be extremely welcome.

Thanks guys.

Not an animation expert. It seems that your jump height is too low. Causing the animation to end prematurely/disruptively. Maybe try speeding up the animation based on the height on the ground to your character.

@pickersZ thanks for your reply. Can you offer any insights on how to make those changes taking the jump height into consideration? How do I know the jump height parameters and where do I edit those values?

(Sorry, not an expert in Unreal Engine!)

Thanks

Sorry, it should be the duration of the jump that will factor in how long the animation should last or speed up/down.

The speed of your run + jump strength = jump duration is a little beyond my math capability to explain. Hope i didnt confuse much.

The funny moves before the jump was probably jumping start with the wrong foot placement. Unreal will usually interpolate two different animations, but the footing must be almost at the correct position for the next animation to blend correctly. Otherwise the action would appear quite abrupt.

it has been a long time since i last touched this, so hope i didnt give you wrong information.

@pickersZ thanks for going the extra mile on this, and don’t worry, at least it sends me on the right path regardless of how accurate the details are. Nonetheless, if anyone else can offer any extra input, that’s always welcome!

If you want to do it right you need to implement some better math and mechanics.

First, as all tutorials tend to point out you have 3 state machine states

Jump start where you transition into the jump.
Jump loop where you hang and wait in a static 1 frame animation.
jump land where you go from the animation you have to landing.

Thats as basic and straightforward as can be. And it will tend to glitch a lot depending on a few things.

the advanced implementations need to take the following into account.
Jump apex location/time to reach it.
Jump landing location/time to reach it.

these calculations should be done and adjusted during the jump because things can indeed change (environment moves, character moves etc).

Once you figure out how to get these values (basic parabolic math essentially - make sure that gravity is variable and derived from character movement). You can then modify the animations to figure out where they need to start playing from or play to before transitioning.

Jump start may always play entierly (depends on how you do thing really).
Usually a notify on the statemachine activates the jump node (not a notify on the animation as this can fail).

Jump loop needs to last however long you need before jump land can play, therefore you need to calculate the time from apex to land, and scale or cut the land animation based on that information.

You can cheese these calculations (https://youtu.be/J-GrGKZ0jGM) but I would suggest going for the real thing. You can find more info in the ongoing thread in this section for distance matching locomotion.

The essence of which is, you create a curve within the landing animation that syncs the height from the floor to the animation timing. This can tell you where the animation has to start given a specific height off the floor.