Jump then Fall

Hi!!

I’m trying to achieve the clasical megaman jump movement… jump and fall animation…

there is a way to check if player isFalling() on EventGraph, that is good, but i cant find a way to check if player is jumping but not falling to make the animation change…

On ThirdPerson Template … on EventGraph there is a bool variable named IsInAir? , but it takes its value from IsFalling(), so i need to split it apart:

Jump → IsOnAir must be true… but IsFalling() must return false…
Fall → IsOnAir must be true… and IsFalling() must return true to…

In my case i need to declare 2 bools : IsJumping and IsFalling

I can figure out the ways i could try:

  1. detect when jump button is pressed, if so, set IsJumping to true, that only for jumping… (falling is not a problem since IsFalling() native BP function is ok…)

  2. check somehow the force or upward velocity of my character and manage it with range floats.

  3. any other…?

Well, thanks…

Update:
IsFalling() function has nothing to do with its name… so IsFalling() returns if character is on air… not just falling… i figured out a way to calculate the time jump takes and then play the fall animation…

Not sure if it’s what you want but based on your second suggestion, I think this is the most optimal one. It’s also reusable unlike calculating the jump time which may vary according to gravity.

1 Like

That looks pretty good so i will give a try

Thanks