In this tutorial, we will cover the basic concept and procedure of configuring a simple waypoint route that an AI car can drive on.
- Open the following scene:
- Spawn an AI Waypoint Route into the scene by pressing Ctrl+Alt+R or selecting Tools/TurnTheGameOn/Arcade Racer/Create/AI_WaypointRoute
- Add waypoints to this route by pressing Alt+LeftClick in the Scene View on a Collider.
- Populate the Spawn Traffic Vehicles array with an AI car prefab; or drag the prefab into the scene and manually assign the Waypoint Route to the IKDVC_AI script on the AI car (this happens automatically when the vehicle is spawned by the waypoint route).
Press play to observe the AI behavior.
The AI car should spawn onto the first waypoint, then behave as expected, following the route and stopping at the end.
This tutorial is now complete. Thank you.
Advanced techniques are demonstrated in the Creating A Traffic Simulation tutorial.