๐Ÿšฆ 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