feat(debug): -probes quits after measuring, so a ground check takes 14 s not minutes
The ground measurement was the slowest part of every iteration: the game ran until the shell's timeout because nothing told it to stop. -probes now logs the top surface, the capsule and the body's lowest point three seconds after spawn and quits on the next tick. A run went from minutes to 13.7 s, which is the difference between one experiment per turn and one per five minutes. Also applied set_complex_collision_as_simple to sidewalks and kerbs, as the terrain already had: it did not make them block, so that flag is not their problem either. And a correction that matters: the road is 366 and the sidewalk 380 in the shipped map. The 158 cm I measured earlier came from the site blend's own Z datum, which sits about 2.2 m below the map's because the terrain was added after that blend was written. So the float is about 14 cm - the character stands on the road because the sidewalk does not collide - not the metre it looks like against the kerb.
This commit is contained in:
1 parent
1916321761
commit
e50f620aa3
84 files changed
+171
-142
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -344,6 +344,10 @@ void AGigLineCharacter::BeginPlay()
|
||||
// Visibility trace reports ground at 366, so at least one channel is seeing a different
|
||||
// surface than the one under foot. This names the actor and the Z for each channel.
|
||||
// Foot-contact probe runs from Tick three seconds after spawn — see LogFootProbes().
|
||||
// `-probes` runs the ground probes and then quits: the measurements fire three seconds
|
||||
// after spawn, so a run needs seconds, not minutes. Without the switch the game keeps
|
||||
// running for the capture pipeline.
|
||||
bProbeAndQuit = FParse::Param(FCommandLine::Get(), TEXT("probes"));
|
||||
FootProbeDelay = 3.0f;
|
||||
|
||||
bWalkForever = FParse::Param(FCommandLine::Get(), TEXT("walk"));
|
||||
@@ -1041,6 +1045,17 @@ void AGigLineCharacter::Tick(float DeltaSeconds)
|
||||
if (FootProbeDelay <= 0.f)
|
||||
{
|
||||
LogFootProbes();
|
||||
if (bProbeAndQuit && GetWorld())
|
||||
{
|
||||
// One frame later, so the log lines are flushed before the process exits.
|
||||
GetWorld()->GetTimerManager().SetTimerForNextTick([this]()
|
||||
{
|
||||
if (APlayerController* PC = Cast<APlayerController>(GetController()))
|
||||
{
|
||||
PC->ConsoleCommand(TEXT("quit"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -210,6 +210,9 @@ protected:
|
||||
UPROPERTY()
|
||||
TObjectPtr<class AStaticMeshActor> CameraTestWall;
|
||||
|
||||
/** `-probes`: log the ground measurements, then quit. */
|
||||
bool bProbeAndQuit = false;
|
||||
|
||||
/** Seconds until the foot-contact probe runs; 0 disables it. */
|
||||
float FootProbeDelay = 0.f;
|
||||
void LogFootProbes();
|
||||
|
||||
@@ -526,3 +526,10 @@ Scope: facts and traps that cost time to establish. Planned work lives in [TODO.
|
||||
- **So the slab's 279 m aspect ratio was not the cause** of the missing collision — a 20 m slice of the same mesh fails identically. The mesh itself imports with collision that does not block, regardless of size.
|
||||
- **What does collide:** `Road_Hollywood` (366) and the engine cube stopgap. What does not: every `Sidewalk_*` and `Kerb_*` slice.
|
||||
- **Next place to look:** the sidewalk mesh's geometry - an open surface with no volume, inverted winding, or zero-thickness triangles - rather than the import flags or the size.
|
||||
|
||||
## 2026-11-09 — Fast probe loop, and the real heights
|
||||
|
||||
- **`-probes` runs the ground measurements and quits**: a measurement run went from minutes to **13.7 s**. Without the switch the game keeps running for the capture pipeline.
|
||||
- **The sidewalks' normals are correct** (2790 faces, all pointing up) and they have no loose edges, so winding was not the reason they fail to block.
|
||||
- **`set_complex_collision_as_simple` on sidewalks and kerbs did not make them block** either - the terrain needs it, they do not respond to it.
|
||||
- **The heights at the player, corrected once more:** the road is **366** and the sidewalk **380** in the shipped map; the 158 cm figure came from the site blend's own Z datum, which is ~2.2 m below the map's because the terrain was added after that blend was written. The float is therefore about **14 cm** - the character stands on the road because the sidewalk does not collide - not the metre it looks like against the kerb.
|
||||
@@ -535,7 +535,11 @@ def build():
|
||||
# which puts an invisible lid ~8 m over the whole block: the player
|
||||
# walks on that box instead of the street. Force trace against the real
|
||||
# triangles so the carved street corridor is actually open.
|
||||
if "Terrain" in name:
|
||||
# Walkable surfaces need the same treatment as the terrain: with only the
|
||||
# auto-generated simple collision, a sidewalk does not block a downward trace while
|
||||
# the road does - so every ground mesh that the player can stand on is switched to
|
||||
# complex-as-simple, where the real triangles do the work.
|
||||
if "Terrain" in name or "Sidewalk" in name or "Kerb" in name:
|
||||
asset = unreal.EditorAssetLibrary.load_asset(f"/Game/Hollywood/Site/{name}")
|
||||
if asset:
|
||||
unreal.GigLineAssetTools.set_complex_collision_as_simple(asset, True)
|
||||
|
||||
Reference in new issue
Block a user