AI Vehicles Routes

AI routes can be used to create background traffic in the scene.

  1. Add an instance of the ai_route_presentation prefab to the scene.
  2. Change the positions of the locators in the ai_route_presentation group. These are the points the AI vehicle will drive through.

    You can add additional locators to the route (up to 256):

    1. Add a new instance of the locator prefab in the ai_route_presentation group:

    2. Link the locator in the ai_route_presentation settings in the Inspector:

  3. Change the settings of the route:

    • Prop Tagged — the tag of the route object. Will be used to find the route using blueprint nodes to launch the AI vehicles. The tag must be unique.
    • Time to resolve stuck — for how long the game will try to "unstuck" the vehicle if it gets stuck on the route.
    • Max bumps before cancel — how many times an AI vehicle can become stuck before cancelling the route.
    • Cancel and restart when stuck — if a vehicle is stuck, restart the route.
    • Locator Point Count — the number of locator points a vehicle will drive through before despawning.
    • Truck — an AI vehicle that will drive through the locator points. Can only be a vehicle with base_ in the name.
  4. Add a Start Route node to a blueprint scenario. The vehicle will spawn and start moving through the route when this node is triggered. A Stop Route node is optional as the vehicle will despawn by itself when it finishes the route.