Vehicle Routes Setup

Inside Mobile Traffic System you can have multiple vehicle types.

A vehicle type can be used to limit the movement of a specific type of vehicle over your roads. For example, a truck will only be allowed on the first lane of a highway and not allowed at all inside the city.

For any vehicle that has some circulation restriction, you can define its own type.

Create Vehicle Types

Open the Settings Window and navigate to Scene Setup -> VehicleTypes

To add a vehicle type simply click Add Car Category and insert the name for the category in the empty field.

To remove a vehicle type, click the Remove button for the category you want to remove.

Press Save to apply your settings.

Assign Category to Vehicle

Open a vehicle prefab, select the root object that contains the Vehicle Component, and navigate to the Vehicle Type property.

All vehicle types defined in the previous step will appear in the drop-down and can be selected.

Setup Vehicle Routes

To create a special route, you'll have to edit the waypoint at the beginning of the route, to enforce a restriction, and the waypoint at the end of a route to end the restriction.

For example, to restrict truck access on the second lane of this route the following steps are required:

Select the waypoint mark with the red X disable the Truck from allowed vehicles and press the Set button.

When the Set button is pressed, the settings from the current waypoint will be transmitted to the entire waypoint system until a waypoint that was manually set is encountered and then will stop propagating

Then select the waypoint marked with the green X check back the Truck and press the Set button. This will end the Truck restrictions from this lane.

Routes Visualization

For a better visualization of your vehicle routes open the Settings Window and select Vehicle Routes Setup. This will open the Vehicle Routes window.

You can toggle the routes on/off for each vehicle type and select independent colors for each route for better visualization.

For the example above, using the Vehicle Routes Window, you can see that the Truck is no longer allowed on the second lane.

For a better understanding, watch the following video:

Last updated