- Home /
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?
Loiuzein
thanks for replying
I'm not really sure what are saying
Answer by Loius · Jan 11, 2013 at 10:01 PM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090807im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
(sidestepping, evading, rolling out of the way), how do I do that with a character controller 1 Answer
If a ball that you roll has a projector for shadows, how do you stop the rotation of the projector? 1 Answer
Unity iPhone Roll a Ball Tutorial. Joystick example? 1 Answer
Roll-a-ball tutorial: help with movement 4 Answers