Here’s what I whipped up. Pretty straightforward approach. There’s two custom functions (BP images included) to help keep everything organized and clean. This is all done in the “Character Blueprint”. Nothing done in the Anim BP.
BP Overview …
Base Variables … (you need to create these)
- Move X (Float) … default 0.0
- Move Y (Float)… default 0.0
- Roll Delay (Float)… default 3.0 // Roll cooldown
- IsRolling? (Boolean)… default 0
Movement Input … Set “Move X” and "Move Y"
Combat Roll (Input Event) …
Can I Roll (Function) …
Logic scope is up to you. This is simply an extended check. Prone and crouch conditions are examples. At a minimum I recommend keeping the “Is Walking”. Velocity check assumes you don’t want to allow rolls unless the player is moving at least n speed.
Combat Roll (Custom Event) …
Set Roll Montage (Function)
Detail Images …
Function Local Variable : Roll Montage (Anim Montage - Object Reference) … LEAVE DEFAULT VALUE UNSET.
All that’s left is for you to create each of the montage rolls ( 8 of them ). And then assign the montage to appropriate “Set Roll Montage” in the logic.
I made sure I noted the direction for each of them to make it easier.
e.g. Forward & Right, Forward & Left etc.