How to add a falling animation?

Does anyone know a beginner-friendly method of how I can add a falling animation to my character’s animation blueprint? Recently, due to my own lack of experience with Unreal Engine, I’ve been working on implementing the jump function using the default SideScrollerCharacter’s animation blueprint as a foundation to expand upon.

I managed to get it working with my own character’s original animations and now I want to further expand on my character’s animations by adding the falling animations I made but haven’t implemented yet. Unfortunately though, I’ve been having a tough time of finding any tutorials for beginners on how to accomplish and so I’ve come here for help on matter.

Animation Blueprint Event Graph:

1 Like

when is something falling?
When the Z Velocity is negative.

I get that, I just don’t know how to implement it into the blueprint. I know that I need to create a Falling variable separate from the Airborne variable I created for the jumping animations, but that’s about all I know.

Well “is in air” is usually used to determine if the player is off the ground and can only tell if the player is off the ground as in a jump but what it does not tell you is how far off the ground is the player as in the state of falling.

Since the player is always in a constant state of falling you could use a line trace to calculate how far off the ground the player is once the player is in the air.

https://www.youtube.com/watch?v=6ZFnPliFSX0

A line trace will return a fair number of variables one being the location of where the trace hits an object, assuming ground distance, you can then have a few different values as to what happens when the player is falling while in air.

Based on the return value.

Is the player jumping?
Is the player falling?
Can the player survive the fall?

I created a new Blendspace that combines the Jumping animation with the Falling animation based on tutorial I found. I also created a new animation for transitioning from the idle animation into the falling animation. However, the problem now is how I incorporate the transitional animations into the state machine since the Is Falling component doesn’t distinguish between whether or not character is jumping or falling.

Is it possible for the Transition Rule to have a setup where the IsFalling variable is connected to a branch condition which would use the zVelocity variable used in the Jump/Fall Blendspace to determine whether or not the Transition Rule goes into effect? If not, is there anything else that can be used to distinguish jumping or falling for the Transition Rule? FrankieV suggested using line trace but I have absolutely zero experience with it and watching the linked video only made things even more confusing for me.

Anyways, I created a flowchart illustrating my new theoretical setup for incorporating the falling animation, I hope helps in trying to figure out how to make whole thing work.

Thanks for finding that, although I haven’t been able to replicate blueprint.

I can’t seem to find the Character Movement node, whatever that node is with the multiple outputs reading Velocity X, Velocity Y & Velocity Z, and I don’t know what that node is connected to the Movement Mode node.

Okay, so I changed the Event Graph in my character’s animation BP to look the one in the screenshot you posted.

However, I am still having some problems in implementing the falling animation such as how I can’t hook up the Character Movement variable to the Movement Mode.

There’s also the problem of node. I have no idea what is and I am unable to find it in the list of Actions.

unknown_component.png

Then there’s the issue of the Transition Rule for transitioning from the Jumping/Falling animation to the Landing animation. The problem is that the Transition Rule used the Airborne variable and now that the variable is no longer in use, the Landing animation no longer plays like it should.

landing_transition.png

might need some thought that, is mistaking velocity with direction

try Anmerkung-20190515-193937.png

It still isn’t working :(, for some reason it now plays the Fall_Start animation when jumping & falling despite the fact that the Fall_Start animation isn’t currently hooked up to anything. In addition, every time I quit playing I get the following error message:

I have absolutely no idea what error message is about, on top of my animation blueprint setup playing the wrong animation. Not helping matters is that whole endeavor is starting to feel like a giant byzantine mess that I can’t even begin to decipher. Can anyone else make sense of insanity and help me figure out what is wrong?

Character Animation Event Graph:

State Machine Setup:

Idle/Walk/Run > Jump Start:

Idle/Walk/Run > Jump Loop:

Jump Start > Jump Loop:

Jump Loop > Landing:
jump_loop_to_landing.png

Landing > Idle/Walk/Run:

I did all the things you’ve suggested (except for changing the time remaining to < 0.1 because it causes problems with my animations, 0.5 I find works a lot for me) and it has fixed a number of issues such as the error messages I was getting but I’m still having issues.

The problem is that now when my character jumps he looks like while either jumping or falling:

midair_problem.jpg
At first I thought my character was stuck in the default T-Pose while in mid-air, but after checking the Jump/Falling Blendspace animation file I discovered the actual problem. The problem was that my character was actually stuck in-between the jumping and falling animations with no way to transition between the two animations. The reason for was because the Jump/Fall Blendspace was setup to transition from the jumping animation to the falling animation with a variable called zVelocity, but the current Blueprint setup doesn’t take that variable into account, so the Blendspace cannot transition from one animation to the other.

Since that setup wasn’t working I decided to go with another idea I had. Since I originally created the jumping & falling animations in multiple pieces, I decided to instead string all of the various pieces together without using the Blendspace file.

Unfortunately, didn’t work out either as my character would instead use the falling animation for jumping in addition to falling.

As far as I can tell, the problem seems to be that the animation blueprint doesn’t distinguish between the act of jumping or falling and as a result it ends up only using one of the animations for both actions.

Both the Jump Loop > Jump to Falling & Idle/Walk/Run > Fall Start transition rules use the exact same setup while the Landing transition instead uses a Not Equal to Falling component. Is the fact that the former two mentioned transition rules as well as the *Blendspace to Jump Start *rule all use the Equal to Falling component a possible source of the issue or is there something else I’m missing?

Jump Loop > Jump to Falling & Idle/Walk/Run > Fall Start transition rule:

*Landing *rule transition:

*Blendspace to Jump Start *rule transition:

Also, I made sure make a copy of my project before I overhauled the animation blueprint just to be on the safe side, just in case I need to revert back to the first setup. So I was wondering which setup is more preferable for the animation blueprint?

I’m pretty sure that for the most part is how my animation blueprint is already setup:

Idle/Walk/Run > Jump Start rule transition:

Idle/Walk/Run > Falling:

*Jump Start > Jump Loop:

Fall Start > Fall Loop:*

Jump Loop > Jump to Falling:

Jump to Falling > Fall Loop:

Fall Loop > Landing:

Landing > Idle/Walk/Run:

The only differences I could see were the part about priority, which I assume is :


I tried changing the priority like you suggested but it doesn’t make any difference at all.

The only other difference I noticed is with the Jump Loop > Jump to Falling transition rule. In your setup you have transition rule as Time Remaining < 0.1, whereas in mine the transition is Movement Component > Movement Mode > Is Equal to Falling. The reason I have it setup like is so that Jump Loop animation would transition into the Jumping to Falling animation when the character’s Z Velocity began to decrease downward. I’m pretty sure it doesn’t work because the condition calls for the character to be mid-air while the condition for jumping to begin with already calls for the character to be in mid-air. However, issue is not what is causing the main problem as I tried changing the rule transition to Time Remaining < 0.5 like you suggested and nothing changed.

Actually it is a looping animation, as the character is supposed to remain in a continuously looping animation while ascending upwards before transitioning to the falling looping animation when they begin to move downwards. is done in order to accommodate things that would also launch the character into the air besides jumping such as bouncing on a jump pad which would result in the character being suspended in mid-air for a longer period of time than their regular jump.

As for the main problem, as far as I can tell, the problem seems to be the jumping and falling animations both have Falling conditions but since the jumping animation also a secondary condition to be met, the falling animation ends up completely overriding the jumping animation. I feel like in order to make it work I need to somehow separate the falling condition into two seperate conditions: a upward movement condition for jumping and a downward movement condition for falling. I tried setting up a similar transition rule as the Idle/Walk/Run > Jump Start one with the Idle/Walk/Run > Fall Start transition rule. The only difference being the Lesser than 0.0 Velocity Z condition rather the Greater than 0.0 Velocity Z condition of the Idle/Walk/Run > Jump Start transition rule.


It didn’t work but I didn’t really expect it to, I just didn’t know else to try.

Would really suggest that or use the debug tools, you can then see in effect which route the state machine is taking while playing or check how or if variables are reading (or even if) as expected, i have just set up my own character that is switching from walking to flying or to falling these last few weeks and tbh the debug stuff has helped me solve all issues so far, really helps to see the stuff in action though.

Guys are you still at ?
just curious. I posted how to do on here before.

Basically the character movement component already takes care of everything for you with Find Floor.

You just need to find the floor a suitable amount of frames or height higher then the actual floor to properly display your landing animation.
Floor distance < 30 works for me on the default anim set.

obviously you enter the falling state any time the floor is > 30 from your feet…

is perhaps “part” of your issue, I rather doubt you will get a velocity less than 0 … = 0 yes but not less than. (EDIT: my bad seems that variable does return a negative :smiley: )

to be honest I am not quite sure why you are using velocity z, at least not here.

you can get the falling condition from the movement component, I think someone mentioned before you are by default constantly falling, unless of course any object is stopping you from doing so and it’s perhaps the best way to think of it. You “base” transition rules are going to be either “falling” or “NOT falling” . Anyone correct me on any of if I am wrong though somewhat new to all myself :slight_smile:

Okay, I finally managed to figure it out using tutorial ] I found while searching online for help.

**Event Graph:

Idle/Walk/Run > Jump Start transition rule:
jump_rule.png

Idle/Walk/Run > Fall Start transition rule:
falling_rule.png

Fall Loop > Landing transition rule:**
landing_rule.png
Every now works as intended aside from the animations needing some improvements and a minor glitch. The glitch occurs when the rounded edge of the character’s collision capsule touches a ledge while jumping, resulting in the character getting stuck in the Jump Loop animation until the character resets the pose by carrying out another action, rather than transitioning into the Landing animation & then into the Idle/Walk/Run animation blendspace as it should. I’m fairly certain that the reason that occurs is because there isn’t a animation transition that connects the Jump Loop animation to the Landing animation, and so when the collision capsule hits the edge of a ledge while still in the jumping animation, the character will remain in that animation cycle until the pose is reset. In theory, if I were to connect the Jump Loop animation directly to the Landing animation it should fix the problem, although I’m not sure if I need to worry about the other animations as well such as the Jump Start & Jump to Falling as well.

Anyways, thanks for all the help even though I ended up going a different solution than what was recommended here, but the help was appreciated nevertheless :)!

Idk. Using velocity doesn’t seem sound when you have 100% accurate ray tracing that is already being done based on the capsule and you can plug into it at next to no processing cost.

either way easiest fix for getting stuck is to move the capsule up. The ray trace for finding the floor should adjust automatically so your character should not be able to sink below the floor anyway. should. Its worth a test anyway.

I don’t have any experience whatsoever when in comes to Ray Tracing, it might be relevant to another issue that I need to deal with but out of curiosity just how much impact does using velocity have on performance? I ask because while I would prefer to be as efficient as possible to ensure a smooth 60 frames per second experience, I’m not exactly intending go for something super ambitious in terms of graphics. In addition, to help with performance I intended to go with common cost-cutting actions like low resolution textures and simplified geometry for the backgrounds, as well as ensuring that all objects not in the foreground have no collision because what’s the point in a 2D sidescroller? Would using velocity have a major impact or could I get away with using it as long as I keep other areas of my game’s performance in check?

I’m not sure if I’m misinterpreting part but the problem isn’t my character getting stuck in the floor. My character is capable of moving around perfectly fine when the glitch occurs, rather the problem is that my character remains in the Jump Loop animation while on the ground. Like I said before, I’m fairly certain the problem originates from having my character’s collision capsule coming into contact with a ledge while in the aforementioned Jump Loop phase of the overall jumping animation. You see how the jump cycle is setup is that the character transitions from the Jump Start to the Jump Loop while accelerating upwards and then into Falling Loop when going downwards, finally transitioning into the Landing animation and into the Idle animation after contact with the ground. However, the Jump Loop isn’t connected directly to the Landing animation and so when the character is in the Jump Loop phase & comes into contact with a ledge, there is no animation transition to the Landing animation while in the Jump Loop phase. The result is that the character remains in the Jump Loop animation until they either carrying out another action such as jumping or falling which will reset the character’s animation into it’s proper state.

Ok 2 things, no using speed won’t impact performance and there definitely are different ways to skin a cat so to speak, but why do something that could potentially need to be re-done later when you can just do it once and forget about it? (images below)

Thing 2, The side scroller starter is a true and complete mess. that’s probably why you are having issues. I literally just looked into it and really, it’s not you, it’s how they went about implementing the base movement. I would dump the whole sheet and create the characterBP if you haven’t already done so.

For fixing the jump land thing it’s pretty simple actually, add an anim notify to the jump land and force your character out of the loop by changing the appropriate bool.

Here’s how I have it done (not for a sidescroller but should adapt fine).

First, the jump you need:

I’m using a notify to also start the jump, because the animation would other-way just start playing after you are already in the air.

is the animation state, because it kinda matters.


The notify is here for me, but that’s kinda unimportant if you keep your current code sequence / if you don’t need to delay the jump to match the anim.

Since I was in there i grabbed another couple of somewhat related screenshots i’ll share just so you have ideas.
Jump speed shift:

Character Movement - I should probably try and hook up in side scroller too… mostly because you can’t get a decent range of motion for turning left to right / right to left with the set up of y -1 x axis they have…

Last thing probably worth noting, is the character movement stuff within the character animation print. the way the sidescroller has it is kinda minimal, but in the end it’s all very similar regardless of the casting as well. except for the movement direction i guess since there is none in sidescroller.

Best of luck :wink:

Using velocity doesn’t seem sound when you have 100% accurate ray tracing that is already being done based on the capsule and you can plug into it at next to no processing cost.