Traffic Behavior Analysis
Guides
/
Traffic Behavior Analysis
Updated 3 years ago by kgftbz

https://cdn.discordapp.com/attachments/402473913168429056/830614838345465856/unknown.png In this image you are the red car, and the blue car is the trafic. The trafic has a very basic programming of "how it sees" the road. It doesn't see things in 3D, only "1D" The trafic only sees "Lanes" or "Path ways" For us the lanes are all twisted and with turns, but the way the trafic sees lanes, is if they were all straight lines. In this image we have lane 1 and 2 (green lines) The trafic is coming on lane 1, and you are on another lane, so the trafic sees nothing in front of him. But while making the turn (pink line), you enter lane 1 for a second. And in that moment the trafic sees you, so they decide to change lane (purple line) They don't know that you are also changing lane soon, they just see that you are now in front of them. And while they are changing lane, the 2 paths intersect and cause an accident.

If you kept always in lane 2 the trafic would not know you exist. If you changed to lane 1 and kept there, the trafic would dodge and avoid you successfully. (unless you're too fast and hit before they had time)

Using the horn helps a lot manipulating this behaviour to avoid colisions. The police sirens also trigger trafic to dodge the police car. Most the time the trafic will dodge to the outermost lane when it hears the player's horn or the police sirens. If they are already in the outermost lane they will most likely not dodge.

When coming from behind, using the horn on police cars will make them stop instead of turning and hitting you while you're passing them.

I did a texture edit to see and experiment with the trafic's paths. In this video you can see that a lot of the trafic interferance is just it trying to follow it's path normally and we getting it's way, like in 0:35 or 1:20. and that the other times they jump on us, it's just them trying to dogde us because we entered their path, like in 1:03 and 2:00. also interesting that after 2:00 that zone only has one path each direction, that's probably why the horn has less effect there.

You can download and experiment with that texture file here: (Keep a backup of your original texture4.zip) https://www.mediafire.com/file/yueiy4iaqspliy9/texture4.zip/file