- Home /
How do I make my character animations work?
I need a walk sprint and idle animation script all in one when shift + uparrow is pressed he sprints and when shift is released it continues walk animation please help.
Do some tutorials and figure out how $$anonymous$$ecanim works. Learning everything you need to make a game is a lot of work, and you are never going to do it with such a lazy attitude.
Answer by getyour411 · Feb 01, 2014 at 09:45 PM
switch (yourCharacterState) {
case charSate.Idle:
play "idle";
break;
case charState.Sprint:
play "sprint";
break;
case charState.Walk:
play "walk";
break;
}
I think this is a good use case for an Enum. You set charState based on Input(get.axis) values or other game logic. That's psuedocode, adopt to your language.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
animation on key press problem 1 Answer
Mecanim Animations float til end of animation 1 Answer
How to export MMD model to Unity? 0 Answers
Need help with some OnTrigger Scripting 2 Answers