From 1ee2a35d53669bd6875fb1a2845980918c55873f Mon Sep 17 00:00:00 2001 From: Zwitschi Date: Mon, 9 Nov 2026 18:03:06 +0100 Subject: [PATCH] test(placement): the ground hit is local, not a far part of a 279 m mesh The probe now logs the horizontal distance from the player to the impact point. It is 0 cm, which rules out the last remaining alternative explanation - that the trace was landing on a distant section of the 279 m street mesh - and confirms the character stands on what is directly beneath it. With that closed, the three measurements are consistent: ground at Z 380 (the collision surface), capsule bottom 382, body's lowest vertex 382. The engine's geometry is right. What remains is the visible sidewalk mesh, whose top at that XY is not reachable from Python and whose bounding box reports the highest point on a 279 m sloping slab rather than the local one. --- Game/GigLine/Source/GigLine/GigLineCharacter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Game/GigLine/Source/GigLine/GigLineCharacter.cpp b/Game/GigLine/Source/GigLine/GigLineCharacter.cpp index cb98f8a..2d2035a 100644 --- a/Game/GigLine/Source/GigLine/GigLineCharacter.cpp +++ b/Game/GigLine/Source/GigLine/GigLineCharacter.cpp @@ -403,9 +403,13 @@ void AGigLineCharacter::LogFootProbes() } } } + const float HitDist2D = bTop + ? FVector::Dist2D(FVector(Top.ImpactPoint.X, Top.ImpactPoint.Y, 0.0), + FVector(GetActorLocation().X, GetActorLocation().Y, 0.0)) + : -1.f; UE_LOG(LogTemp, Warning, - TEXT("GigLine top surface under player: hit=%d Z=%.0f actor=%s mesh=%s (actor Z %.0f)"), - bTop ? 1 : 0, bTop ? Top.ImpactPoint.Z : -9999.f, + TEXT("GigLine top surface under player: hit=%d Z=%.0f xy(dist %.0f) actor=%s mesh=%s (actor Z %.0f)"), + bTop ? 1 : 0, bTop ? Top.ImpactPoint.Z : -9999.f, HitDist2D, bTop && Top.GetActor() ? *Top.GetActor()->GetName() : TEXT("none"), *MeshName, GetActorLocation().Z); }