AI Vehicles Routes
AI routes can be used to create background traffic in the scene.
- Add an instance of the ai_route_presentation prefab to the scene.
-
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):
-
Add a new instance of the locator prefab in the ai_route_presentation group:
-
Link the locator in the ai_route_presentation settings in the Inspector:
-
-
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.
-
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.