- Home /
How to add AI cars in car game.
I have finshed the unity car tutorial successfully and it is working as it should, now I want to find out how I could add AI cars to the game, can anyone help? Thanks in advance.
Answer by falconer · Feb 15, 2013 at 03:25 PM
There's one method using waypoints. Download "SeekSteer.js" script, Attach it to the enemy racecar. Further, create a series of empty gameobjects that will mark the AI car's path through the racetrack. It will follow these points precisely, so make sure you mark out a clear path and with waypoints very close to each other. Next, click on the AI car, and set the property Waypoints to a number that equals the amount of waypoints you have. Next, drag each waypoints into its slot on the car. A red line will appear, marking your car's path. Press play and you are done with it !!
I've created empty game objects but am unsure how to place them on the track. Dragging and dropping doesn't work, and I can't see any cube when just inputting the coordinates manually. any tips?
Thanks!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Old school racer: can I do it in Unity? 1 Answer
Ai turning problem on Android - Question solved 0 Answers
ai spot you with flashligt on!!! 1 Answer
Sample for card matching/memory game? 2 Answers