[Project Week 5.3] Idle animation

Player idle animation

What I also did today was create an idle animation, this animation is pretty basic but works in every direction that the sprite is facing, for example if the player is facing right the idle animation will still function as it would if he was facing forward.

There are a few things I had to do to get the animation working on my player in-game, firstly I had to tweak the character script a little so that the player connects with the animator





Then I had to make it so whenever the player faces a certain direction the animation also is set in that direction also, so looking right will set the right idle animation, up will set up idle and so on.



This is how my animation is set up so that animations work one after the other, for example after pressing the key to go right the right idle animation is played, and if I press down straight after that the down animation is played. This works due to the way I have set things up and wouldn't work if the transitions wasn't set up correctly. The arrows you see in the picture are transitions and only set off based off certain parameters which are these:



And in English this pretty much means if the player is facing right then proceeds to go up, the conditions will recognize that and play the up animation. It is then reversed so that when you press right again, it will recognize the coordinate and play the right animation.

Conclusion

Creating the idle animation was pretty easy although it was quite time consuming when changing all the different conditions for it to function smoothly, but overall the idle animation works in all directions I just need to make it so that it doesn't constantly play while moving. After all, it's only meant to play while 'idle' as in standing still.

Here is what the idle animation looks like currently:






Comments