god of war/dmc type evade mechanic

Hi I’m new to this community

I’m kinda stuck, trying to figure out how to add the evading roll (like when kratos or dante, roll in the direction the player chooses to avoid taking a hit)

I’m using a character controller, and I’ll add the actual animation once I’ve finished creating the assets, for now I’m just trying to get the functionality down

any ideas?

For a bit of time, instead of listening to player input, go fast in a direction while playing the animation.

“For a bit of time” - use a coroutine for simplicity, or just use a float var as a timer.

“Instead of listening to player input” -

if ( dodging ) {
  GoFastInADirection(); // if using float timer - otherwise the coroutine will be handling this
} else {
  ApplyPlayerInput();
}

“Go fast in a direction” - .Move your controller by whatever is appropriate.