diag(phys): [cyl-test] probe — log every Cylinder shadow collision test
Adds a one-line diagnostic per Cylinder ShadowEntry tested in FindObjCollisions, gated on ProbeBuildingEnabled. Useful for the door-collision investigation surfaced 2026-05-24: tells us whether the broadphase returned a candidate door AND what CylinderCollision decided (OK / Collided / Adjusted / Slid). Off in normal play (probe flag off by default). General-purpose; not door-specific. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3e5dc8ce4c
commit
1498697bc5
1 changed files with 13 additions and 0 deletions
|
|
@ -2308,6 +2308,19 @@ public sealed class Transition
|
|||
// the same 6-path dispatcher. For now we keep the swept-sphere
|
||||
// cylinder test which matches the retail CylSphere behavior.
|
||||
result = CylinderCollision(obj, sp);
|
||||
|
||||
// A6.P4 door investigation (2026-05-24): log every Cylinder
|
||||
// shadow tested. Tells us whether the broadphase returned
|
||||
// the door AND what CylinderCollision decided. Greppable
|
||||
// alongside [entity-source] (which logs the door's radius
|
||||
// / height at registration). Gated on ProbeBuildingEnabled.
|
||||
if (PhysicsDiagnostics.ProbeBuildingEnabled)
|
||||
{
|
||||
Vector3 dxy = obj.Position - sp.GlobalCurrCenter[0].Origin;
|
||||
float distXY = MathF.Sqrt(dxy.X * dxy.X + dxy.Y * dxy.Y);
|
||||
Console.WriteLine(System.FormattableString.Invariant(
|
||||
$"[cyl-test] obj=0x{obj.EntityId:X8} state=0x{obj.State:X8} radius={obj.Radius:F3} height={obj.CylHeight:F3} pos=({obj.Position.X:F2},{obj.Position.Y:F2},{obj.Position.Z:F2}) distXY={distXY:F3} result={result}"));
|
||||
}
|
||||
}
|
||||
|
||||
// L.2a slice 3: attribute the collision (if any) to this entity.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue