- Home /
How do I make an idle animation play when I haven't moved?
So I'm currently making a 2d top down game and I want to have my idle animation play when the player isn't moving and I also would like it to happen after a few seconds of being still would anyone know how to make this happen? Is there some code if so some help would with that would be cool.
(maps not mine just using it as a test) Anyways this is what I have.
Answer by theANMATOR2b · Nov 29, 2017 at 07:46 PM
"want to have my idle animation play when the player isn't moving"
Set the idle animation as the default animation, so as soon as the game starts the idle animation is playing.
"would like it to happen after a few seconds of being still"
This can be accomplished in several ways, make it time based - if other character animations are not playing after X seconds - play idle animation.
OR If no player input detected after X seconds play idle animation. OR When the player stops pushing a button to move/attack, the character can go into a default (no-animation) animation which would transition directly into the idle animation. The idle animation will play until the player interacts with the character again. OR Numerous other ways.
Sorry I do not code I'm a animator.