DOTS Traffic City is a powerful tool for creating city traffic - Design it from the ground up or customise any existing asset pack to fit your vision!
It uses the extremely powerful DOTS Entities package to simulate thousands of vehicles and pedestrians with unbelievable performance!
- Mobile friendly
Simulate thousands of interacting vehicles and pedestrians, even on mobile devices. - Performance
Experience the performance firsthand in our various platform-specific demo projects or just check out the final screenshots to see the results. - Rapid integration
Integrate any city asset pack in a heartbeat with our convenient templates and tools. - Simulation
Simulate thousands of entities without relying on physics or raycasting (although physics simulation is also available). - Editor
Many flexible tools to bring life to the city of your dreams. - Demo
GTA-like sample scene included! - Sound
Integration of the FMOD sound engine into bursted jobs (built-in unity audio engine supported from v1.1.0, new). - Documentation
All components of DOTS Traffic City are linked to online documentation. - Source code
All code included. - Pre-made templates
Use pre-built road templates to integrate some of your favourite cities (POLYGON City, City Pack 1, Toon City) with just one click. - Vehicle controller
DOTS physics vehicle controller included! - You can also use Edy's, RCC or NWH & other custom vehicle controllers for both player or traffic. (new)
- Monobehaviour support
Not familiar with DOTS? No problem, from version v1.1.0 the project is fully compatible with mono behaviour scripts in hybrid mono mode (check out the new Hybrid Mono sample scene). (new) - Modular architecture
Allows you to integrate the project into your existing game without hassles. (new) - Runtime Tile Demo. New demo scene showing how to create a city builder based on tiles (runtime spline coming soon). (new)
- Train support. You can either use a built-in solution or flexibly integrate a third-party controller for the train. (new)
- 3rd-party
Compatible with EasyRoads3D & Agents Navigation. (new) - More 3rd-party integrations coming in the near future.
Key features:
Traffic
- Physics
Vehicles can use either: - Parking
Customizable parking lines and parking areas. - Speed control
Automatic vehicle speed control depending on lane speed limit, traffic lights and other traffic. - Lane changing
Automatic vehicle lane changing based on traffic congestion or road type. - Traffic groups
Restrict lanes to certain traffic group types. - Public transport
Vehicles that can either only move on predefined roads (such as trams or cable cars) or randomly throughout the city and can pick up pedestrians at stations and stops. - Fast creation
Quick and easy tool for adding any vehicle into the city. - Avoidance
The avoidance system makes sure that vehicles don’t collide with each other and will stop and move away if another vehicle is blocking their path. - Priority
Vehicles pass through the intersections according to road priority. - Antistuck
An Antistuck system that destroys the entity if it gets stuck for a while and isn't visible in the player's camera. - Traffic Jams
Cars won't enter crossroads if they can't get through in order to avoid causing traffic jams. - Left-hand traffic.
Starting with version 1.1.0, driving on the left is available. (new) - Culling
Vehicles only spawn around the player. - Combined physics
Limit physics to only the vehicles closest to the player in order to improve performance. - LODs
LOD system for the vehicles depending on the distance to the camera. - Tests
A handy traffic test scene where most traffic situations can be tested with all available parameters. - Damage
Health & damage system example included.
Pedestrians
- Rig type:
- Legacy pedestrian
Hybrid entities using the Unity Mechanim Animator. - Pure GPU
Pure entities that are animated by the GPU. May be useful for extreme amounts of entities. - Hybrid and GPU
This mode lets you mix Hybrid Animator models for near and GPU animation for far at the same time, with seamless transitions. (new)
- Simulation type:
- Physics
All pedestrians have a physics collider. - No physics
Pedestrians don't have physics colliders, all interactions and collisions are calculated by custom jobs.
- Behaviour
Multiple pedestrian behaviours such as idle, walking, running, talking and sitting. - Navigation:
- Local avoidance
Simple lightweight method for avoiding vehicles. - Navmesh avoidance
Calculate NavMesh paths on the NavMesh surfaces by bursted job. - Agents Navigation
3rd party navigation package for high quality pedestrian crowd simulation. (new)
- Culling
Pedestrians will only spawn around the player. - Culling state
Only pedestrians in the player's line of sight are fully active. - Ragdoll
Ragdolling is currently only supported with default colliders (A ragdoll tool cloner for cloning similar Ragdolls is included). - Event triggering
Event impact on pedestrians by area. - Tests
Pedestrian test scene where the workability of entities can be tested.
City
- Traffic road
Multiple road templates and custom road customization tools. - Streaming
Create infinite cities by dividing 3D assets and road entities into chunks for streaming at runtime. - Culling
All entities in the city change their behaviour depending on the culling state (including traffic and pedestrians). - Physics culling
Only the physics objects close to the player are involved in the physics evaluation. - Traffic light
Quick and easy creation of traffic lights. - Props
Examples of prop systems that handle the behaviour of props based on damage taken or distance from the player. - Debug
Convenient visualisation of data on scene. - Tests
Test scene for props where the workability of entities can be tested.
Tools
- Road segment creator
A Tool containing the 9 most commonly used road templates, allowing you to quickly and easily set waypoints and route settings of any complexity. - Auto-crossroad generation
New option to create crossroads with a single click. (new) - Parking builder
A tool for creating parking lines or parking areas of any complexity. - Pedestrian node creator
A Tool for quickly creating routes for pedestrians. - Car prefab creator
A Tool that quickly converts 3D models of vehicles to traffic entities in just a few clicks. - Global traffic light settings
A tool to connect traffic lights and traffic nodes, pedestrian nodes, crossroads, and visually display the timings of each traffic light on the scene. - Path data viewer
A convenient Tool for quickly viewing paths and path waypoint data. - TrafficNode data viewer
A convenient Tool for quickly viewing traffic node data. - Path creator
A Tool for creating paths to connect traffic nodes. - Animation baker
Tool for quickly creating GPU instanced animations for pedestrians. - SubScene chunk creator
A Tool for dividing the 3D assets of a scene into chunks to load them at runtime. - Ragdoll cloner
A cloner Tool for cloning ragdolls that have already been created.
Demo Scenes
- Demo
GTA-like sample scene. - Demo Mono
Same scene as demo, but all simulations run in hybrid mode of monobehaviour scripts with DOTS. (new) - RuntimeTile Road Demo
Sample scene showing how to create a city builder based on tiles (runtime spline coming soon). (new) - RuntimeTile Road Mobile Demo
Sample scene showing how to create a city builder based on tiles (mobile version). (new) - Runtime ChunkRoad Demo
Sample scene demonstrating the road chunks added at runtime. (new) - Custom Train Demo
An example of how a 3rd party train solution can be integrated. (new) - Traffic test scene
A handy traffic test scene where most traffic situations can be tested with all available parameters. - Pedestrian test scene
Pedestrian test scene where the workability of entities can be tested. - Props test scene
Test scene for props where the workability of entities can be tested. - City stress scene
A scene for stress testing that combines thousands of vehicles and pedestrians. - City stress scene mobile
The Mobile version of the City stress scene. - Traffic stress scene
A scene that is extremely crowded with vehicles in order to stress test vehicle amounts. - Traffic stress scene mobile
The Mobile version of the Traffic stress scene. - Pedestrian stress scene
A scene that is extremely crowded with pedestrians in order to stress test pedestrian amounts. - Pedestrian stress scene mobile
The Mobile version of the Pedestrian stress scene. - Pedestrian animation stress scene
Performance scene comparison between Unity Animator animations and GPU instanced animations. - Vehicle physics stress scene
Stress scene for thousands of cars with vehicle physics. - Vehicle custom physics test scene
A scene for testing various parameters of the custom vehicle controller.
Tutorial Playlist
Demo
Windows | Android
To get started
Tutorial | Documentation
Contact me
Discord | Email
Limitations
- Only works with Unity 2022.3.21 & Entities 1.2.0 or higher.
- WebGL not supported.
- Built-in RP not supported.
- Vehicles with trailers or wagons are not currently supported for NoPhysics.
- Animator with skeletal bone animation in pure DOTS space is currently not available (only hybrid entities with an Animator approach or pure entities with GPU animations are available).
- NavMesh surface obstacles calculated only with NavMeshObstacle.
- Ragdoll is currently only supported with default colliders.
Third-party usage:
Projects:
Please read Third-Party Notices.txt for more information