I'm creating a 2D game in which enemies on the right side chase after the player on the left side. I was wondering if there's another way for the enemies to chase after the player as they move without rotating as it flips the images (has animations) upside down and backwards. I'd appreciate any suggestions or feedback! Here's my current code:
public void aggro() { Player player = (Player)getWorld().getObjects(Player.class).get(0); int PlayerX = player.getX(); int PlayerY = player.getY(); turnTowards(PlayerX,PlayerY); move(2); }