๐ฆ Traffic Toolkit DOTS
March 20, 2025 ยท View on GitHub
A high performance traffic simulation toolkit built using Unity DOTS. Designed for large scale traffic systems with realistic AI movement, intersection management, and collision avoidance.
https://github.com/user-attachments/assets/7ac2a1cd-607c-4ed7-8057-ff10d8d51b79
๐ Features
โ๏ธ Built for Scale โ DOTS powered architecture optimized to simulate thousands of vehicles efficiently!
โ๏ธ Waypoint Based Navigation โ Vehicles follow dynamic paths
โ๏ธ Traffic Light System โ Manages intersections in real time
โ๏ธ Collision Avoidance โ Prevents frontal crashes using raycasting
โ๏ธ Editor Tools for Debugging โ Visualize vehicle paths and collisions
๐ How It Works
1๏ธโฃ Vehicle Movement
- Vehicles follow waypoints dynamically
- Supports turning at intersections
2๏ธโฃ Traffic Lights & Intersections
- Traffic signals control vehicle movement
- Vehicles wait for a green light before crossing
3๏ธโฃ Collision Detection
- Uses raycasting for real time frontal collision prevention
- Vehicles adjust speed to avoid crashes
๐ Debugging & Editor Tools
โ Custom Waypoint Editor โ Easily create & connect routes in the Scene
โ Visualize Vehicle Paths โ Shows real time planned vehicle path
โ Collision Gizmos โ See detection range in Scene View
โ Select Vehicles Easily โ Search by ID and focus on vehicles
๐ฏ Roadmap
๐ AI Behavior Improvements โ More realistic driving patterns
๐ Better Asset Management โ Load different car models & cities
๐ Performance Optimizations โ Faster processing for larger traffic networks