🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

animating character with multiple walk animations

Started by
1 comment, last by Alberth 5 years ago

I am a complete noob with animating anything. I have started learning some of the basics though and pulled in a free asset from Unity asset store that comes with a character and a bunch of animations. So far I was able to get the idle and walk working. However I noticed that there are turn left, turn left 45, turn right, and turn right 45 animations. I'm not sure how to handle these. I've seen where someone does an empty state in the animation controller between idle and walk and then links from that empty state into several different states, but I'm not sure when I need to implement something like that. Do I need that in this case to go from the empty state to any of the walking states, or do I need to branch off of Walk to all of these other animations? Thanks for any help!

Advertisement

You could need it, it depends on what you want to happen.

An animation is a sequence of pictures that are usually supposed to be shown in a fixed sequence. Also, often, you don't want to just switch to a different animation if one is halfway being played. In other words, there are often limitations in which picture(s) can be shown next given that you are showing a particular picture now.

On the other hand, a user can press buttons or click a mouse button at any time. If such key presses or clicks directly control the picture sequence being shown, you may end up violating the limitations that you want to have in the animation sequences.

If you don't want such violations, you need a way to decide whether a key press may be processed when it arrives. Using explicit states is one way to achieve that. State is however a very general concept, you could also just use an enumeration or even a simple number to denote which animation is being showed (and which picture in that animation precisely).

 

The first thing to do seems to decide which animation sequences you have, and how they may be chained (at the end of one animation, which next animation may be started?). Second, you have to decide how user actions influence those animations, ie how do you decide which next animation to play based on what the user enters (don't forget what should happen if the user does nothing!).

Once you have a clear idea of what you want, you can start thinking how to achieve that.

This topic is closed to new replies.

Advertisement