How to stop traffic jams from occuring in vehicle system from City Sample in UE 5.8?

Hi! I am making an ArchViz project as a tech artist, and I am using the City Sample vehicle system that spawns cars on connected zone shapes in my own project. Cars use their own physics from the source project; speed is about 25 mph, and they are more alert to obstacles rn. Roads don’t use Nanite.

In the UE editor, they behave normally. But when I pack a build, they drive around for about 10 min, then they start causing traffic jams and sometimes disappear or fly up. They seem to occur at equal distances from my camera. And when I fly farther away, cars seem to continue their trip. I suspect that It has something to do with changing car representation from physical to simplified version.

Does anyone know how to fix it?

The ring of jammed cars that moves with the camera is the Mass Traffic physics bubble, not a bad spline.

City Sample only keeps vehicles near the current Mass viewer as real physics actors. Everyone else is a lightweight agent slid along the zone graph. The swap happens at a fixed distance from that viewer, which is why the pile-ups sit on a circle around the camera, and why flying further out lets those cars “continue their trip.” In the editor the viewer updates constantly and the physics pool is big enough that you rarely live on the boundary. A packaged build ticks slower and is pickier about who counts as the viewer, so cars sit on that boundary and the handoff fails.

What fails there: the physics actor is removed and a lane agent is supposed to take the same lane reservation. If the reservation does not land (intersection full, or the body was off the spline when it was destroyed), that agent stops and everyone behind it stacks. Cars that vanish or launch are the same handoff. Either the body is removed while it is still overlapping something, or the far-LOD visualization mesh was not cooked into the package, so the car exists in PIE and disappears in the build the moment it leaves the bubble.

What to change:

  • Find the Mass Traffic settings asset the City Sample config uses (Project Settings, search Mass Traffic, and the data asset your zone spawner references). Raise the distance for the physics representation, or drop it so the switch is outside the camera range you actually fly. The ring should move when you change that distance. If it does not, you are editing the wrong asset.
  • Raise the max number of physics vehicles so a whole junction near the camera stays physical instead of half physics and half agent.
  • The viewer has to be the camera you fly. A possessed pawn’s camera manager updates it. An ArchViz cinematic camera that is not the possessed pawn often does not, and the bubble sticks at the last viewer location. If the ring is not centered on the camera you are looking through, that is the bug.
  • On the zone graph, check that lanes through the jam have a next lane and that the intersection is not closed. A missing link only shows up once cars stop using the physics “drive around it” path.
  • For the ones that disappear only in the package, check the cook log for the vehicle visualization mesh. An unreferenced or editor-only mesh is in PIE and missing from the build.

I would change the physics distance and the viewer before touching chaos substepping. The ring following the camera is that distance.