How can I make enemy follow a certain path only?

Hey so in my game (shown on the pic), I have a player (P) and an enemy (E). I’ve drawn red lines on the paths that I want to allow my enemy to take, and I want my enemy to move towards my player using these paths only. However, have no idea how I will implement this functionality in unity and code, maybe it’s really simple, but I’m stuck. Please can someone help me out, thank you.

Waypoints…

1 Like

Nailed it.
You basically want to have a set of points, set the destination to 1. When the distance to this very small you can set the destination to the next waypoint.

Heres a good example of it in the documentation.
Link

2 Likes

Thank you! I’ll have a look into it since I’ve never done waypoints before