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.
This commit is contained in:
1 parent
579ae2ba41
commit
1ee2a35d53
1 file changed
+6
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user