However, I am unsure how to trigger an animation using this code for my character avatar. I’m more of an animator than coder lol. So I have animations for the character to walk in all four directions, basically, but I don’t know how to get each to trigger when the sprite travels in each respective direction.
Do you have movement code? Such as the character being able to walk in each direction.
If you already have the movement code set in place, you can add animations that play when the player is headed in a certain direction.
Since it’s isometric, I’m assuming that the player moves at 45 degree angles instead of straight on the X and Y axis, so when the player moves top right, it plays the top-right animation, but when the player’s velocity is zero the animation could play an idle or stop playing.
Sadly this is just a simple explanation and I’m currently in school or else I would take a look at your game real quick and maybe make a simple example you could use.
When the W key is pressed (or up arrow depending on how you make the controls) Play the upward animation. Then do the same for the other sides. Like this