Is Falling function returning incorrect result

It appears the Is Falling function of the Character Movement node in a character blueprint returns and incorrect value in certain circumstances.

Details:
Within the character blueprint:

  • Jump function is called when jump input is pressed.

Within the animation blueprint:

  • Update animation sets an IsFalling variable using the Is Falling function from the character blueprint.
  • State machine has a 180 turn state machine that is only entered when IsFalling is false.
  • Additional notify event was created at start of 180 turn state to print value of IsFalling, and to make a separate call to the Is Falling Function of the character blueprint (to verify in case update anim was not occurring between last updating the variable and entering state machine)
  • The notify event also sets a variable that disables jumping until the 180 turn animation is complete.

Results:
The turning animation performs in mid air if the jump was pressed just before the turn takes place. The value of the IsFalling variable returns False and the call to the IsFalling function also returns false when the notify fires as the state is entered.

It seems the jump function is firing, then the turn animation plays because it does not realize the character is in the air. Is this a bug, or is there a better/ best practice way to determine if the character is in the air than using the Is Falling function?

Ok, further debugging executing a printout of the Z velocity when the animation fires. It shows a Z velocity of zero… So my question is now what happens at the moment the character is jumping and reaches the zenith of the jump and begins to fall. At that moment would the IsFalling return False because the Z velocity is zero, even though the character is in the air? This is a big deal for me because I am using root motion for all movement except for jumping (because it looks awful). If these methods are incompatible anyone know of a way to get root motion jumps that don’t look ridiculous.

Hi NtyCar,

As a troubleshooting step I replaced the “FallingLoop_RootMotion” animation with the “ThirdPersonJump_Loop” from the blank Third Person Template and the animation works as expected. That is, the character is no longer able to make a 180 turn in mid-air while. Also the character continues the forward momentum of the jump instead of stopping and launching straight up, as it did when I changed the order of the states in the state machine.

So the problem appears to lie with the “FallingLoop_RootMotion” animation instead of with your AnimGraph set up. Note that replacing the jump animation is a troubleshooting step and not the final solution. For instance, doing it this way causes the character to stop upon landing and restart running verses transitioning back to a run state upon landing.