AI Cars drive on AI Waypoint Routes, this tutorial demonstrates how to configure an AI car to drive on a route.

Getting Started

In this tutorial, we will cover the basic concept and procedure of configuring a simple waypoint route that an AI car can drive on.

  1. Open the following scene:
    Assets\TurnTheGameOn\Arcade Racer\Scenes\RacingCity_Empty
  1. Spawn an AI Waypoint Route into the scene by pressing Ctrl+Alt+R or selecting Tools/TurnTheGameOn/Arcade Racer/Create/AI_WaypointRoute

  1. Add waypoints to this route by pressing Alt+LeftClick in the Scene View on a Collider.

  1. 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.


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
For customer support, please contact us here.

Post Comment