feat(physics): Cluster A — indoor BSP collision probe

Adds the [indoor-bsp] probe + ProbeIndoorBspEnabled toggle for the
Indoor walking Phase 1 BSP-cluster investigation. Mirrors the existing
[resolve] / [cell-transit] / [indoor-*] pattern: one log line per
BSPQuery.FindCollisions call from FindEnvCollisions' cell branch,
capturing cell id, sphere local-pos, result TransitionState, and the
hit poly's normal + side-type via the LastBspHitPoly side-channel
(already wired for ProbeBuildingEnabled, now also fires for the indoor
flag).

Toggle via ACDREAM_PROBE_INDOOR_BSP=1 env var or DebugPanel checkbox.
Zero-cost when off.

Predecessor for the three fix commits that will close ISSUES.md
#84/#85/#86 after the capture session.

Spec: docs/superpowers/specs/2026-05-19-indoor-walking-phase1-bsp-cluster-design.md
Plan: docs/superpowers/plans/2026-05-19-indoor-walking-phase1-bsp-cluster.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-05-19 14:24:07 +02:00
parent 18a2e28875
commit 27d7de11d8
6 changed files with 96 additions and 9 deletions

View file

@ -1,5 +1,6 @@
using System.Numerics;
using AcDream.Core.Combat;
using AcDream.Core.Physics;
using AcDream.UI.Abstractions.Panels.Debug;
namespace AcDream.UI.Abstractions.Tests.Panels.Debug;
@ -285,4 +286,26 @@ public sealed class DebugVMTests
Assert.Equal(1, weatherHits);
Assert.Equal(1, wireHits);
}
[Fact]
public void ProbeIndoorBsp_ForwardsToPhysicsDiagnostics()
{
var originalEnabled = PhysicsDiagnostics.ProbeIndoorBspEnabled;
try
{
var vm = NewVm();
vm.ProbeIndoorBsp = true;
Assert.True(PhysicsDiagnostics.ProbeIndoorBspEnabled);
Assert.True(vm.ProbeIndoorBsp);
vm.ProbeIndoorBsp = false;
Assert.False(PhysicsDiagnostics.ProbeIndoorBspEnabled);
Assert.False(vm.ProbeIndoorBsp);
}
finally
{
PhysicsDiagnostics.ProbeIndoorBspEnabled = originalEnabled;
}
}
}