Download

Make Character Fall in the Correct Direction

Hi,
I’m working on my 3rd person character and I’m having trouble with falling.
The character always falls in a straight line down. Even if I jump from high ground while running he won’t fall forward, but straight down. If I remove my fall animation from my animBP, the character will simply run in the air in the direction of the inputs.
What am I doing wrong? Is there a way to add actual physic to the fall animation?

Maybe you’re looking for air control?

Guess not…
I think it’s something about the transition from the jump state to the fall state in the animBP. If I remove the fall state then the air control works but as long as it’s there, the character will always fall only down.
I’m trying to compare it to the Third Person Character but I can’t find anything different in the stats/transitions/anims.

The animBP only determines what gets drawn, not how the character moves.
Your character controller needs to detect that there is no ground contact, and move into a falling state, where it lets gravity act.
If you’re using the default character controller from the engine, then it will do this, unless you turn off the behavior. If you’re using your own way of controlling the pawn/character, then you need to implement this yourself.

I am using my own way of controlling the character, but still have the character movement component, so I know when my character is falling or not. And I made sure that the movement mode changes accordingly (walking on ground and falling in the air). The character does fall, but only downwards without any velocity (if I fall after running forward I’d expect the character to fall forward and not straight down).

You can’t be using the character movement component for character movement if it falls straight down.

Let’s ask this another way: Do you call “SetLocation()” on your character each step? Or do you simply feed (possibly adjusted) control input into the Character Movement Component and let the CMC update the character position?

Or, another way: If you start a new first- or third-person template project, and jump/run off a ledge, does the physics behave the way you expect it to?

To your later question - yes.
Even in my character, if I delete all connections to my fall state in my animBP (which means there won’t be an animation in air) and then I run off a ledge the physics behave the way I expect.
Because I’m using root motion animations in my animBP I feed control input to two floats to control directions.

Solve it - It was because my animBP was set on root motion from everything. Now I’m switching it to montage only when character is falling.
Thanks for the help though.