- Home /
Action Game - Character Dash (Plz Help)
I'm making a action game, and I been trying to make my character model Dash, he play the dash animation, but I can't get him to move why the animation playing.
Ps: I want, When you press the button it play the animation and You lose control over the character moving the character in the direction you aim, when the animation end the player stop moving and you can control him again.
Hmm... I didnt done anything like this but i would do this like so :
First create an Vector3 var to store last position before using dash.
private Vector3 dashDir;
Then in the (Fixed)Update make some condition like "canPlayer$$anonymous$$ove"
if(canPlayer$$anonymous$$ove){
//here put your movement code
Next check if player is pressing the dash key:
if(inputDash$$anonymous$$ey){
dashDir = new Vector3(InputX, 0.0f, InputZ);
// here you can set time for how long dash wil take
canPlayer$$anonymous$$ove = false;
And the last thing is to just put else statement to you if(canPlayer$$anonymous$$ove)
rigidbody.velocity = dashDir * dashSpeed;
Your answer

Follow this Question
Related Questions
Can I make animations snap to a frame? 1 Answer
How to but a animation movie in Unity? 4 Answers
Skinned mesh performance concerns 0 Answers
How do I create animated LOD characters? 0 Answers