I’m debugging a strange UE5 issue and haven’t been able to find the cause.
Setup:
- Unreal Engine 5
- Character is written entirely in C++
- I have a single Anim Montage that contains all 8 dodge animations.
- The code selects the correct montage section using Montage_JumpToSection() based on the movement input direction.
The problem only occurs when I press the movement keys and dodge at the same time.
For example:
- A + S + Alt (same frame)
- S + D + Alt (same frame)
It does NOT happen if I’m already holding W or S, then press another movement key, and then press Alt to dodge.
When the bug happens:
- The player starts doing infinite back rolls.
- The character keeps moving farther away every roll.
- The camera appears to detach because the character never stops rolling.
- It always ends up playing the backward dodge repeatedly.
I’ve already checked:
- The montage contains all 8 dodge animations as sections.
- Section names match my C++ code.
- I already tried clearing the Montage Section links so sections shouldn’t chain into each other.
- Logging shows the movement repeats in identical cycles, suggesting the montage section is restarting over and over.
Has anyone experienced something similar?
Could this be caused by:
- Montage section chaining?
- Root motion?
- Montage_JumpToSection() being called multiple times?
- Input handling when multiple keys are pressed simultaneously?
- Something else I’m overlooking?
If needed, I can also share my Dodge() function and the montage setup.