Below is how you do it on AnimBP. I used the ThirdPerson template and add the Jump From Ledge anim state:
- From ThirdPersonCharacter blueprint:
-
Add IsJumping boolean variable
-
Implement OnJumped event of CharacterMovementComponent
-
Implement OnLanded event of CharacterMovementComponent
-
Together with CharacterMovementComponent’s IsFalling check, we can differentiate falling from ledge vs falling after jump.
- From AnimBP Event Graph:
-
Create IsJumping? variable. This is a counterpart variable from IsJumping from the character blueprint
-
At the end of existing anim event graph, add CastToThirdPersonCharacter node, then get its IsJumping variable to set AnimBP’s IsJumping? counterpart variable
- From AnimBP AnimGraph → Default
-
Expand the existing AnimGraph
-
Add Conduit conduit node. Conduit lets you branch out to multiple node with similar transtition.
-
Add FallOfLedge state. Set animation to your Fall Off Ledge animation.
-
Connect Idle/Run into Conduit conduit (transition = IsInAir?)
-
Connect Conduit into JumpStart state (transition = IsJumping?)
-
Connect Conduit into FallOfLedge state (transition = NOT IsJumping?)
-
Connect FallOfLedge into Idle/Run state (transition = Time Remaining (ratio) < 0.2)
That should do it. Your Jump and FallOffLedge animation should play properly apart from each other.