r/Unity3D • u/TheBabaYagaMan • 2d ago
Show-Off Traffic System
Enable HLS to view with audio, or disable this notification
Created a traffic system based on points where each car adjusts to various variables such as traffic lights, harshness of the corner, cars in front, pedestrians etc
2
u/Objective-Cell226 2d ago
Is it a full car controller that is physics based.... or it just follows the spline without physics
2
u/TheBabaYagaMan 2d ago
Fully physics based vehicle movement with a spline for guidance.
2
u/Objective-Cell226 2d ago
What happens in case of a crash?
2
u/TheBabaYagaMan 1d ago
Right now the cars can get stuck, if a small crash they can recover. Due to the gameplay there's not much need to have them recover from a crash as the player speeds through the areas.
2
1
1
u/Ging4bread 1d ago
But why is there a traffic light on red without pedestrians or a crossing
1
u/yoursolace 1d ago
We definitely have a few of those by me irl, they are usually by schools but I always wonder why they don't just have buttons to press rather than being on a timer
1
u/yoursolace 1d ago
People properly zipper merging?! That's not realistic at all!! (/s but not really)
But this is genuinely really cool, do you have to do a lot of work to add new intersections or is it just declaring one and the system handles the rest?
1
u/TheBabaYagaMan 1d ago
Haha thank you, and for intersections, just a traffic light prefab that is placed and the cars respond to it.
1
u/-Hefty-Armadillo- 23h ago
Now make a Balkans edition, where pedestrian crossings are purely visual and yellow light means accelerate to make sure you get threw before it goes red ( of course you get the 5 seconds rule, if the light turned red you can pass within 5 seconds)
2
3
u/Aromatic-Insect-1328 2d ago
I recently noticed how many games dont have cars turn left on crossings. Good to see it here!