test(profile): the road is a flat slab at 366 while the sidewalks slope

Added a -profile probe: one downward trace every 20 m along the street at the player's Y, naming
the surface each time. It settles the question the bounding boxes could not:

  x=-14336..-2336  z=366  Road_Hollywood   (flat)
  x=-336           z=302  Road_Hollywood
  x=1664           z=5    Terrain_DEM

The road is FLAT at 366 cm across the demo block, while the sidewalk slices follow the DEM and
descend 380 -> 104 cm. So the ~2 m gap is not an import artefact and not a collision problem: the
road itself does not follow the elevation the sidewalks follow.

That also explains why every sidewalk fix failed - the surface the player stands on is this flat
road, and the sloped sidewalk is metres below it.

Next: how rows is built in Art/blender/street/street_mesh.py. The road and the sidewalk read the same
dem_z(x, y), so a flat road means the sampler returns the same value for every row.
This commit is contained in:
zwitschi committed 2026-11-09 18:22:52 +01:00
1 parent b551396882
commit b84d47ec18
2 files changed
+44

No files matched your search

@@ -1045,6 +1045,36 @@ void AGigLineCharacter::Tick(float DeltaSeconds)
if (FootProbeDelay <= 0.f)
{
LogFootProbes();
if (FParse::Param(FCommandLine::Get(), TEXT("profile")) && GetWorld())
{
// Ground profile along the street: one downward trace every 20 m at the
// player's Y, naming the surface each time. Comparing the road's profile
// with the sidewalks' is what the per-mesh bounding boxes could not do.
const FVector Base = GetActorLocation();
for (int32 Step = 0; Step < 14; ++Step)
{
const float X = Base.X + Step * 2000.0f - 1000.0f;
FHitResult Hit;
FCollisionQueryParams Q(TEXT("GigLineProfile"), false, this);
const bool bHit = GetWorld()->LineTraceSingleByChannel(Hit,
FVector(X, Base.Y, Base.Z + 2000.0f),
FVector(X, Base.Y, Base.Z - 4000.0f), ECC_WorldStatic, Q);
FString MeshName = TEXT("none");
if (bHit)
{
if (const UStaticMeshComponent* HitMesh =
Cast<UStaticMeshComponent>(Hit.GetComponent()))
{
if (const UStaticMesh* Asset = HitMesh->GetStaticMesh())
{
MeshName = Asset->GetName();
}
}
}
UE_LOG(LogTemp, Warning, TEXT("GigLine profile x=%.0f z=%.0f mesh=%s"),
X, bHit ? Hit.ImpactPoint.Z : -9999.f, *MeshName);
}
}
if (bProbeAndQuit && GetWorld())
{
// One frame later, so the log lines are flushed before the process exits.