And make sure that the animation’s names match the state keys, but I’m guessing you already checked that.
You might also need to put the updateAnimation() call after the velocity = moveandslide() call because it seems like velocity is impacting the player’s state.
thanks for the reply ,
I already checked what you’ve mentioned , it still doesn’t work
however after checking the tree while the game is running, I can see that in the animatedSprite the idle animation is running but it wont show the sprite or the frames on the screen
Maybe you can try using an animation player instead of an animated sprite; the animation player node might be better suited to handle player animations. I think the use case scenario for the animated sprite node is a bit more niche, but I don’t remember where I learned that.
BigTuna675 | 2022-08-04 18:07
i’ve fixed it , i still don’t know how or why it didn’t work but , I made the “move” and “get direction” functions in one single function then i changed the player state according to the velocity where in the other code i used to change it when ever i change direction