Skip to main content

UB1CityTrafficControlDataAsset

Overview

  • Please insert internal data for control traffic flow. Data asset containing all configurable parameters for controlling city traffic flow and vehicle spawning.

Metadata

FieldValue
Kindclass
EnvironmentB1 - Presentation
Categoryclasses
ExtendsUB1DataAssetBase

Properties (12)

NameTypeDescription
AdjustVehiclesMaxRatenumberMaximum ratio of vehicles allowed in the city while the player is riding a vehicle.
GreenLightAdditionalTimeRationumberMultiplier ratio applied to the additional green light time.
GreenLightExtraTimeintegerAdditional time (in seconds) added to the green light duration.
HorizontalOffsetRangeFVector2fHorizontal offset range for vehicle lane placement (normalized [-1.0, 1.0]; 0 is center). Mitigates single-file convoy behavior.
LaneSearchIterationintegerNumber of lane search iterations used to find a valid spawn lane for a vehicle.
MaxInstancesNearbyintegerMaximum number of vehicle instances allowed in the nearby AOI area before blocking a new spawn.
MaximumSpawnRangenumberMaximum distance from the lane start or end beyond which spawning is disallowed.
MinimumSpawnRangenumberMinimum distance from the lane start or end below which spawning is disallowed.
NearbySearchStepsintegerNumber of AOI steps used to search for nearby vehicles during spawn checks.
SpawnExcludeCameraAngleDegreesnumberFull cone angle (degrees) around camera forward. A spawn point inside this cone is refused outright - there is no fallback, so a tick where every candidate is on screen spawns nothing. An empty road is better than a car appearing out of nothing: for a viewer, and for anything trained on the footage, a vehicle that was not in the previous frame is a broken fact, while missing traffic is merely quiet. The cone is the whole test - it is deliberately not paired with a distance band the way B2SpawnerHelper::IsVisibleSLOD0Spawner pairs it for crowds. That band is MediumDistOut (6000 uu by default), the distance crowd characters stop being rendered; vehicles are drawn far beyond it. Pairing them would leave the outer part of the spawn ring judged "not visible". 180 = the entire front hemisphere, matching UB1CharacterSpawnControllerDataAsset's SpawnExcludeCameraAngleDegrees. Kept identical on purpose: crowds and traffic answer the same question, and two different answers would show up as pedestrians and cars popping in at different distances in the same shot. Lowering it does NOT make spawning safer - it opens a wedge in front of the camera where cars may appear. Only lower it if the spawn ring sits beyond the distance vehicles are drawn at, where the cone stops mattering.
SpawnTrialCountintegerMaximum number of spawn attempts per vehicle when trying to place it in the world.
VisibleDespawnRangeScalenumberHard removal distance, as a multiple of MaximumSpawnRange, for a traffic vehicle that is still being rendered. Range-based removal is skipped while a vehicle is on screen, otherwise a car receding down a straight road is destroyed in plain sight - the same broken fact as a pop-in, played backwards. But "still rendered" can stay true indefinitely down a long straight, so this bounds it: past this distance the vehicle is removed no matter what. It has to be comfortably larger than 1.0, or the guard buys nothing.