Path-finding in 2D space
问题 I am creating a game where I want an enemy to path track onto the player - who can move in any direction on the 2D plane. At first, I tried... self.bat_x += (player_rect.centerx - self.rect.centerx) / 60 self.bat_y += (player_rect.centery - self.rect.centery) / 60 Here the path-tracking works fine. I divide each value by 60 so that the enemy doesn't just appear and stick on to my player / to slow the movement of the enemy down. However, the further away the enemy is, the faster it is. The