Where to start learning about AI?

So I just made myself a simple 2D game to get myself comfortable with Unity. My scripting skills are shoddy but will (hopefully) do. I can get around the UI, create a UI, create player controllers, steal other people’s code off StackOverflow, use Google AdMob and Leaderboards etc… I wanted to start making a 3D game with AI. Where would I start to make an enemy that would go by itself on a predefined track and adjust its speed based on the players position?

I saw this: Unity - Manual: Navigation and Pathfinding

Would that be a good start? For now I don’t need very intelligent AI, but something that would follow a pre-defined course and change speed based on whether the player was ahead or behind it would be great.

In case you’re wondering, its for a space si-fi racing game.


Yes, the link you found is a good start. Unity navigation gives you an easy way to move entities around, while surrounding obstacles. Predefined paths are just a bunch of waypoints (Vector3s) that ca easily be assigned in an inspector, through an array or list. The unit then can just walk them one after another, back and forth, as you like. Triggerspheres are a good way to grab the Player and change the behaviour by setting his transform as the target to follow (remember the navigation is done for you).