Hi, so i want to move the enemy towards the player but i don't know how to do it. I have a world scene, a player scene and an enemy scene.
Thats my code:
Move enemy towards player
Asked Answered
Eonian Each frame take player's and enemy's positions and then use Vector2::move_toward() to calculate enemy's new position that's nudged towards the player.
© 2022 - 2024 — McMap. All rights reserved.