qa: swept ground transect closes the traversal release check

84 samples across the north sidewalk, carriageway and south sidewalk
(X -14900..-9420) come back with 0 holes and ground Z 317..395, so the
block is traversable rather than merely spawnable.

TODO: sidewalks/collision item now records the collision state and what
is genuinely left (kerb radii, aprons, kerb-height assumption); the
traversal release check is ticked with the measurement.
This commit is contained in:
zwitschi committed 2026-11-08 11:54:25 +01:00
1 parent 7930be38bb
commit cdfb24a2b1
3 files changed
+46 -5

No files matched your search

@@ -297,8 +297,42 @@ void AGigLineCharacter::StartQASelfTest()
State->bUnpausedBack ? TEXT("PASS") : TEXT("FAIL"));
}
// 6.0: verdict, then stop ticking.
if (E >= 6.0f)
// 6.0: ground transect - sweep both sidewalks and the carriageway and
// count holes, so "can traverse the block without falling through"
// is measured rather than assumed.
if (E >= 6.0f && State->Step < 7.0f)
{
State->Step = 7.0f;
UWorld* W = GetWorld();
int32 Holes = 0, Samples = 0;
float Lowest = 1.0e9f, Highest = -1.0e9f;
static const float Lanes[] = {-1400.0f, -167.0f, 1000.0f}; // N walk, road, S walk
for (float LaneY : Lanes)
{
for (float X = -14900.0f; X <= -9420.0f; X += 200.0f)
{
FHitResult Hit;
FCollisionQueryParams Q(TEXT("GigLineTransect"), false, this);
const bool bHit = W->LineTraceSingleByChannel(Hit,
FVector(X, LaneY, 3000.f), FVector(X, LaneY, -3000.f),
ECC_Visibility, Q);
++Samples;
if (!bHit)
{
++Holes;
continue;
}
Lowest = FMath::Min(Lowest, Hit.ImpactPoint.Z);
Highest = FMath::Max(Highest, Hit.ImpactPoint.Z);
}
}
UE_LOG(LogTemp, Log,
TEXT("GigLine QA: transect %d samples, %d holes, ground Z %.0f..%.0f -> %s"),
Samples, Holes, Lowest, Highest, Holes == 0 ? TEXT("PASS") : TEXT("FAIL"));
}
// 7.0: verdict, then stop ticking.
if (E >= 7.0f)
{
const bool bAllPass = State->bWalkMoved && State->bResetReturned
&& State->bPausedOn && State->bUnpausedBack;