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).
Here’s How to Fix It:
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.
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.
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
To keep it all organized, we use our own plugin called Asset Optics:
Track logic bugs like “sprint doesn’t cancel on crouch” directly on the Character BP
Leave comments like “added check in anim BP: Crouch > Sprint”
Sync that across the team so animation fixes aren’t repeated or missed