Godot enemy AI without Navigation or A* Pathfinding

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JeremiasDev

Hello, how can I make an opponent follow my player and avoid objects like walls, trees, fences …? But all of this without a * pathfinding or navigation? How does it work?

:bust_in_silhouette: Reply From: Lopy

If your enemy knows where the player is, it can move towards it. As for avoiding obstacles, you can use a few Raycasts to steer away from them. However, the enemy will get stuck on corners, which is why A* or other methods exist. If you want to implement your own pathfinding, you could make D*.

Hey, thank you for your answer, can you linked me a video or write a script?

JeremiasDev | 2020-12-28 19:35