How to let the enemy follow player while avoiding walls?

Hi everybody,

I’m making a game, and I’m working on the enemy right now…
I know how to make it walk and follow the player, but it is just the basic following system.
(I mean like: the enemy goes straight towards the player, and just walks through walls
when they’re in his way.)

My question is: Is there any way to let the enemy follow the player, while avoiding walls? (I don’t have unity pro)

Hope this info is good enough, and btw sorry for my english :confused:

What you require is “pathfinding”. There are some libraries using the A* algorithm which does exactly what you need. Basically explained: a grid will be put on the level and based on this grid computer controlled characters can find a way to the target, while avoiding obstacles.

Thanks :slight_smile: That’s what I needed.