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: http://docs.unity3d.com/Manual/Navigation.html
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.
THANK YOU SO MUCH!
Answer by hexagonius · Jan 09, 2016 at 11:38 PM
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).
Your answer
Follow this Question
Related Questions
Can someone explain the math behind finding the velocity relative to where I'm looking? 2 Answers
Object to Waypoint script. 1 Answer
Simple AI for Unity to patroll and follow the player 0 Answers
How can I make my turret also rotate on the X-axis? 0 Answers
My player spins when I enter play mode. What am I missing? 0 Answers