Skip to content

feat: ParkedCarStreamer — frustum-gated runtime spawn with pooling #210

Description

@nigel-hall-codes

The #202 POC payoff: runtime-spawn parked cars only where the camera can see them.

Scope

  • Fork TrafficManager's loop: ring + distance cull + paced maxSpawnsPerTick + wait-for-chunk road raycast + shared target resolution.
  • Add the two upgrades it lacks:
    • a real ObjectPool<T> (TrafficManager Instantiate/Destroys);
    • a frustum spawn-gate (GeometryUtility.CalculateFrustumPlanes + TestPlanesAABB).
  • Route the gate through a single IsVisible(pos) seam so occlusion drops in later untouched.
  • Tune hysteresis/latency so cars don't visibly pop as the camera turns.
  • Measure against the spike's baseline.

Blocked by the runtime-data change. Parent: #202.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions