Enemy pathfinding script for a 2D top down shooter game
Hello There, I am creating a 2D top down shooter and have just ran into the problem of making a decent ai. Currently i have a script which just moves the enemy towards the player using transform.position and makes the enemy turn to face the player in the x direction (this is intentional), the problem is that the enemy gets stuck on every box collider in his way. I am struggling with finding / creating a pathfinding script for my enemies to allow them to find the shortest path around the obstacles / box colliders towards the player. Any solutions weather it be using a waypoint system or otherwise would be appreciated (I am rather new to c sharp so I would appreciate it if you explained how each bit of your solution works). Please help, Thanks in advance!
Your answer
Follow this Question
Related Questions
astar pathfinding with groups 0 Answers
Adjusting enemy speed 2 Answers
Ai Destinations not changing when using length of raycast, 0 Answers
How do I make opposing sides in a unity game 0 Answers
Enemy staying at a certain distance instead attacking 0 Answers