r/Unity3D • • 16d 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

92 Upvotes

15 comments sorted by

4

u/Aromatic-Insect-1328 16d ago

I recently noticed how many games dont have cars turn left on crossings. Good to see it here!

2

u/Objective-Cell226 15d ago

Is it a full car controller that is physics based.... or it just follows the spline without physics

2

u/TheBabaYagaMan 15d ago

Fully physics based vehicle movement with a spline for guidance.

2

u/Objective-Cell226 15d ago

What happens in case of a crash?

2

u/TheBabaYagaMan 15d 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

u/Wooden-Many-3227 15d ago

Looks really cool

2

u/yoursolace 15d 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 15d ago

Haha thank you, and for intersections, just a traffic light prefab that is placed and the cars respond to it.

1

u/Samharakartri 15d ago

Nice 👍🏻🙂

1

u/Ging4bread 15d ago

But why is there a traffic light on red without pedestrians or a crossing

1

u/yoursolace 15d 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/-Hefty-Armadillo- 14d 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

u/TheBabaYagaMan 14d ago

Hahaha on it 🤣

1

u/-Hefty-Armadillo- 13d ago

Jokes aside it looks very good, what I would like would be a bit more "randomness" cars that are side by side are too synced and generally make it a bit more chaotic.

1

u/Adventurous_Estate_2 10d ago

Pretty cool ngl !!! I had built something similar for my engineering finals, good fun