Mobile Traffic System
  • Key Features
  • Demo App
  • Quick Start
  • Setup Guide
    • Prepare Scene
    • Vehicle Pool
    • Initializing Asset
    • Create a Road
    • Connect Roads
    • Priority Crossing
    • Priority Intersection
    • Traffic Lights Crossing
    • Traffic Lights Intersection
    • Setup Give-Way Waypoints
    • Roundabout Setup
    • Highway Enter Setup
    • Speed Routes Setup
    • Vehicle Routes Setup
    • Waypoint Priority Setup
    • Waypoint Setup Window
    • Waypoint Properties
    • Vehicle Implementation
    • Truck + Trailer Implementation
    • Path Finding Setup
    • Player Component
    • Change drive side
    • Debug Window
  • Complete API
    • AddDrivingAction
    • AddExcludedVehicle
    • AddExcludedVehicleToSystem
    • AddVehicle
    • AddVehicleControl
    • AddVehicleWithPath
    • AddWaypointEvent
    • ChangeLane
    • ClearPathForSpecialVehicles
    • ClearTrafficOnArea
    • DisableAreaWaypoints
    • DriveActions
    • EnableAllWaypoints
    • ExcludeVehicleFromSystem
    • GetAllVehicles
    • GetClosestWaypoint
    • GetExcludedVehicleIndex
    • GetExcludedVehicleList
    • GetPath
    • GetPriorityCrossingStopState
    • GetTrafficLightsCrossingState
    • GetVehicleComponent
    • GetVehicleIndex
    • GetVehicleSpeed
    • GetVehicleState
    • GetWaypointFromIndex
    • Initialize
    • InstantiateTrafficVehicle
    • IsInitialized
    • RemoveDrivingAction
    • RemoveVehicle
    • RemoveVehicleControl
    • RemoveVehiclePath
    • RemoveWaypointEvent
    • SetActiveSquares
    • SetCamera
    • SetCameras
    • SetDestination
    • SetEngineVolume
    • SetHazardLights
    • SetIntersectionRoadToGreen
    • SetPriorityCrossingStopState
    • SetTrafficLightsCrossingState
    • SetTrafficDensity
    • SetVehiclePath
    • StopVehicleDriving
    • TrafficOptions
    • TriggerColliderRemovedEvent
    • UpdateVehicleLights
  • Events
    • onDestinationReached
    • onVehicleAdded
    • onVehicleCrashed
    • onVehicleRemoved
    • onWaypointReached
  • Delegates
    • Building In Trigger
    • Dynamic Obstacle In Trigger
    • Modify Trigger Size
    • Player In Trigger
    • Spawn Waypoint Selector
    • Traffic Lights Behaviour
    • Vehicle Crash
  • External Tools
    • Easy Roads
    • CiDy
    • Road Constructor
  • Visual Scripting
  • FAQ
  • V2 vs V1
  • Upgrade Guide
    • Upgrade from v1.x.x to v2
    • Upgrade from v2.x.x to v2.3.x
  • Releases
  • Support
Powered by GitBook
On this page
  • Create Vehicle Types
  • Assign Category to Vehicle
  • Setup Vehicle Routes
  • Routes Visualization
  1. Setup Guide

Vehicle Routes Setup

PreviousSpeed Routes SetupNextWaypoint Priority Setup

Last updated 1 year ago

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:

To see all the vehicle-type edited waypoints see the window.

Show Vehicle Edited Waypoints
Vehicle Types Window
Assign Type
Vehicle Routes Window