Traffic Configs
Traffic Car Spawner Config
![]()
Hub/Configs/TrafficCarConfigs/CommonConfig
Traffic Car Settings
![]()
Hub/Configs/TrafficCarConfigs/CommonConfig
Entity Type
Hybrid entity simple physics : hybrid entities moved by the simple DOTS physical system (description).
Hybrid entity custom physics : hybrid entities moved by the custom DOTS physical system (description)
Hybrid entity mono physics : hybrid entities moved by the custom Monobehaviour controller (description) (new)
Pure entity custom physics : pure entities moved by the custom DOTS physical system (description)
Pure entity simple physics : pure entities moved by the simple DOTS physical system (description).
Pure entity no physics : pure entities that moved by transform system without physics (description).
Note
Depending on which entity type such a preset is converted.
Detect Obstacle Mode
Detect Npc Mode
Disabled
Calculate : mathematically calculates the npc.
Raycast : detect obstacle by raycast (npc should have PhysicsShape component).
Simple Physics Movement Type
Car input : simple emulation of real movement based on traffic input.
Follow target : the vehicle rotation is set based on the destination direction.
Common Settings
Simple Vehicle Settings
- Has rotation lerp :
Rotation speed : vehicle rotation speed.
Rotation speed curve : curve on the dependence of the speed of the car on its speed.
Custom Vehicle Settings
Other Settings
Traffic Obstacle Config
Config to calculate obstacles on the path.
![]()
Hub/Configs/TrafficCarConfigs/ObstacleConfig
- Obstacle intersect calculation method: method of calculating the intersection of the vehicle and the intersect point.
Distance : distance between car and intersect point.
Bounds : calculate intersect point that inside the car bounds.
Note
- How to calculate the parameters relative to the size of the vehicle hull:
Select the mesh renderer of the vehicle hull and insert to the Target Car Mesh field.
Press Recalculate button.
On the traffic test scene, calibrate the parameters depending on your needs.
Parameter visualization:
![]()
Obstacle distance example.
![]()
Approach distance example.
![]()
Min distance to check next ConnectedPath example.
![]()
Short path example.
![]()
Calculate distance to intersect example.
![]()
Calculate distance to intersect same target example.
![]()
Change lane close distance to point example.
![]()
Maximum distance to the obstacle in the target change lane example.
![]()
Short path example.
![]()
Same direction example.
![]()
Avoid crossroad jam example.
Traffic Approach Config
Config of approaching obstacles and lights (test scene).
![]()
Hub/Configs/TrafficCarConfigs/ApproachConfig
Auto brake before speed limit
The car automatically brakes to the new speed limit at the selected distance.
Note
Approach distance set in Traffic obstacle config.
Traffic Raycast Config
Traffic raycast Config (TrafficDetectObstacleMode raycast or hybrid should be enabled) (debug example) (more info).
![]()
Hub/Configs/TrafficCarConfigs/RaycastConfig
Traffic Change Lane Config
Config for automatic calculation of lane change by traffic (works for paths with the Straight road road type only) (test scene).
![]()
Hub/Configs/TrafficCarConfigs/ChangeLaneConfig
Parameter visualization:
![]()
Min/max change lane offset example.
![]()
Min distance to last car in current lane example.
![]()
Min distance to other cars in other lane example.
![]()
Min distance to intersected path example.
Traffic Npc Obstacle Config
Config to calculate npc obstacles (example).
![]()
Hub/Configs/TrafficCarConfigs/NpcObstacleConfig
Traffic Antistuck Config
Config to culling car in case of stuckness.
![]()
Hub/Configs/TrafficCarConfigs/AntistuckConfig
Traffic Horn Config
Config to sound random horns when an obstacle is detected. It can be disabled (here).
![]()
Hub/Configs/TrafficCarConfigs/HornConfig
Traffic Avoidance Config
Config of traffic avoidance.
![]()
Hub/Configs/TrafficCarConfigs/AvoidanceConfig
Traffic Custom Destination Config
Config for custom destination of the vehicles. Also used by traffic avoidance.
![]()
Hub/Configs/TrafficCarConfigs/CustomDestinationConfig
Traffic Rail Config
Config for rail movement of the vehicles.
![]()
Hub/Configs/TrafficCarConfigs/RailConfig
Traffic Collision Config
The config is used in a two-car collision.
![]()
Hub/Configs/TrafficCarConfigs/CollisionConfig
Traffic Behavior Config
Config for setting different driving styles.