Sprint Animation Not Cancelling When Crouching

Whenever I hold Shift to sprint and then immediately press crouch while still holding Shift, my stamina stops regenerating because the sprint animation doesn’t cancel when I crouch. Does anyone know how to fix this?

This isn’t an “Animation” issue based on what is being shown. Movement Speed is changing, but you’re not clearing the Sprint State.

Hey @bloatedthms — great question. This is a pretty classic issue with overlapping input states and animation logic. You’re absolutely right: crouching should cancel sprinting, but if it’s not wired up correctly, your character stays in the sprint state visually and logically (which blocks stamina regen).


:wrench: Here’s How to Fix It:

:white_check_mark: 1. Manually Cancel Sprint on Crouch

In your Crouch input event, add a node to set IsSprinting = false or trigger a custom event like StopSprinting.

Blueprint flow:

arduino

CopyEdit

InputAction_Crouch → StopSprinting (set sprint flag = false)
                   → Crouch node

This ensures sprinting logic and animation both stop the moment you crouch, even if Shift is still held.


:white_check_mark: 2. Update Your Animation Blueprint Logic

If you’re using a Blend Poses by Bool or a State Machine, make sure:

  • Sprint state is not active when IsCrouching = true
  • Your anim graph handles priority overrides (Crouch > Sprint)

Use a layered bool like:

ini

CopyEdit

CanSprint = IsMoving && !IsCrouching && HasStamina

This way, crouching immediately invalidates sprint eligibility.


:brain: Bonus Tip: Debugging These State Bugs

We’ve had a bunch of issues like this in larger animation setups — sprinting + crouching + stamina + aim offsets… it gets messy fast :sweat_smile:

To keep it all organized, we use our own plugin called Asset Optics:

  • :white_check_mark: Track logic bugs like “sprint doesn’t cancel on crouch” directly on the Character BP
  • :pushpin: Leave comments like “added check in anim BP: Crouch > Sprint”
  • :counterclockwise_arrows_button: Sync that across the team so animation fixes aren’t repeated or missed