How to handle jump with a single jump animation?

The default jump animation used by the blue man in UE4 uses a state machine with a start jump, falling and end jump animation. This allows the character to jump, then loop through falling and finally land, so the entire jump can be any length needed, which is great. I have a character that doesn’t have these three animations, it just has a simple 20 frame jump animation, which can’t really be split into three animations as there is no “falling” part to the animation. I can’t just play the whole 20 frame jump animation when the player presses the jump key as the actual jump may be longer (or shorter) than the 20 frames of animation.

What would be the best way to handle jumping in this situation? I was thinking the best thing to do might be to just pause the animation half way (at frame 10 for example) while the character is falling until they touch the ground, then play the last 10 frames of the animation. I think that will look ok as most jumps will happen pretty quick so the player shouldn’t really notice the character’s animation paused.

How would I go about doing something like this… would I still use an animation state machine? How do I “pause” the animation at frame 10, then continue it playing to the end later when needed?

Splitting the animation would make this easier, split it at frame 10 in whatever program you animate in. Then in the state machine, select the animation and disable the “loop” function, that effectively “pauses” the animation until the transition requirements are met for it to play the next animation.

If there’s no falling part of the animation, that’s fine, you don’t need a “landing state animation” but you do need something that tells the engine to stop playing the jump and go back to idle. (using the “Is In Air” variable to check this works fine if your animation doesn’t need all those components)

I’m wondering if a montage might be better as it allows you to “split” an animation? Could I have two sections in the montage, start jump and end jump. Then if I play the start jump section without looping, would it just “pause” the animation of the character? When the character lands I could then transition to the end jump section. Would this work? My main question being does montage pause animation when it gets to the end of an non-looping section?

An opinion fix it at the content level “always”. With the right tools it’s a ten minuet fix, at the most, and worth learning as a process than it is to mess around with patchy work.

The animation itself is good and doesn’t need any fixing? I can split it when I import it into UE4 if I want so I’m not worried about that. I just want to find a way to pause animating at the end of the start jump animation while the character is falling then transition to the end jump animation when the character lands.

If I wanted to decided on which end jump animation to play when landing should I use a montage? For example if the character falls for a short time I would play the normal landing animation. If they fall for a long time I would play the rolling land animation and if they fall for a very long time I would play the dead landing animation. Would this be better suited to a montage or do I stick to a state machine for this?

Another solution might be, to have multiple different poses to share a blend-space for whenever the character is in the air. If the y axis on the blend space is controlled by the characters Z Velocity, or fall speed, while the X axis is controlled by the horizontal speed, the characters pose would always work with however it is moving in the air. For example, you could have a jump up idle pose, and a fall idle pose, along with a jump forward pose and a fall forward pose. If the jump poses are at +300 Z velocity (Going UP) and the fall poses are at say -1000 Z velocity (going down) the blend-space would blend the poses in relation to if the character is going up or down. This is great because you would only need a single blend space for in air. If the character walks off a ledge, iZ velocity starts at 0 and goes down, bypassing the jump poses. But if the character jumps first, the poses would match. You would also never have to worry about the timings, and could always use a looping animation instead of a pose, or use additive animation to keep the limbs moving. Anyway, just an idea.

Ahh ok so as a suggestion as far as the animation goes never pause as the result will look like cardboard. Personally I prefer using blend spaces as it easier to control via data input but if done using a state machine the logic flow would be jump start and while in air cycle the legs and exit based on what leg is forward. The result is a nice run out that looks a lot more natural rather than the player coming out of the jump at a constant velocity. To test this you can retask a copy of the run cycle, hook it up in the state machine, and then test to see how it exits once it hits the ground and you can play with the animation scale to get the perfect speed.

If you really want to pause with little fuss then the flow could be to start the jump transition into in air into a single frame hold as to were the feet need to be positioned on exit and transition into landing. I suggest this way as over time state machines can become very difficult to trouble shoot if hooked up to a dependency out side the loop.

Come to think of it,du, it’s been a while since I used a state machine if you select the clip with in the stat machine and uncheck loop in it’s property it will mode or less pause at the end of the clip.

I used a state machine with a conduit for landing. And then based on speed i select which animation to go to. Works pretty well

That could be the intended goal though.

Anyway, wilberolive as I said before. Disable the “loop” function, it forces the game to hold the last pose until the conditions are met to stop the animation. effectively pausing the animation.