In this lesson, you will learn how to proactively trigger level streaming for high-velocity actors by attaching UWorldPartitionStreamingSourceComponent to your vehicles or fast-moving characters.
The Problem of High Velocity
In a standard World Partition setup, streaming is usually centered on the player’s camera. When a player moves at a normal walk speed, this works perfectly. However, if a player pilots a high-speed vehicle or flies an aircraft, the default streaming radius often fails to load world cells fast enough. The result is "pop-in" or visibility gaps because the game engine doesn't "know" you are about to enter a distant area until it is too late.
Implementing the Streaming Source
To solve this, we add a UWorldPartitionStreamingSourceComponent to the Actor. This component acts as an additional "eye" for the World Partition system, forcing it to keep specific cells loaded in the direction of travel or around the vehicle itself.
You can configure this component via C++ or the Details panel:
// Within your Vehicle class constructor
StreamingSourceComp = CreateDefaultSubobject<UWorldPartitionStreamingSourceComponent>(TEXT("StreamingSource"));
StreamingSourceComp->bEnableStreamingSource = true;
StreamingSourceComp->TargetBehavior = EStreamingSourceTargetBehavior::Include;
StreamingSourceComp->Radius = 15000.0f; // Set based on vehicle max velocity
Strategic Application
When the actor moves, the component automatically updates the streaming logic based on its location. For vehicles, you should set the TargetBehavior to Include, which ensures that the cells within the component's radius are explicitly kept in memory.
A pro-tip for high-speed traversal: offset the streaming source component slightly in front of the vehicle along its forward vector. By doing this, you shift the "loading bubble" forward, effectively widening the horizon of loaded geometry to match your high rate of travel. This preemptive loading prevents the stuttering or mesh popping often seen in racing or flight games when using large-scale World Partition maps.
Key Takeaway: By attaching a UWorldPartitionStreamingSourceComponent to high-velocity actors and tuning the radius, you extend the world’s awareness of the player's path, eliminating visual pop-in during rapid movement.