Hello,
A student of mine wants to turn enemy.1 sprite in the direction that it is moving to chase the player. Anyone have a suggestion on how to do this?
Hello,
A student of mine wants to turn enemy.1 sprite in the direction that it is moving to chase the player. Anyone have a suggestion on how to do this?
You can compare the position of the player with the position of enemy1 to get the direction the zombie is walking in. Here’s how I would do it:
if(player.x > enemy1.x){
enemy1.setAnimation(“zombie walking right”)
}