- Home /
2D character Animation-controller
Hi i´m doing a TopDown Zelda like game, but there is a "Problem" in the Atk Animation of the player, Every time i press the atk Button in idle always be atk at the same direction (down) I see a video of to fix this but is for a Walk Animation, I dont know how to do it for the atk, if someone can help i will be very appreciate
Answer by Unitycreator212 · Oct 28, 2020 at 08:58 PM
You need an animation for each direction. Then play the correct directions attack animation.
I Have the 4 animations for each direction, example if a press a button in idlle always be atacking Down, But if i press UP and ATK button the UpATK ani is played,same for the 2 left animations, I want to run the correct animation where the character is looking, (I have all 4 direction animation)
In that case. Use a variable to store the last direction. $$anonymous$$aking sure that it is only changed when there is input. Then use that variable for deciding which direction animation to play.
Your answer
Follow this Question
Related Questions
so I'm trying to make a 2D platform but the first animation i make is the only one that registers 0 Answers
Why is my animated object making copies... Can't select or remove through Animator 0 Answers
The best way to control speed of the animation together with audio sound that both must sync 0 Answers
Switch Players during play 2 Answers
Unity 2D My animator won't transition between states? Any help would be extremely helpful 0 Answers