fix(physics): remove per-frame indoor walkable-plane synthesis
The indoor branch of FindEnvCollisions called Transition.TryFindIndoorWalkablePlane
every frame to re-synthesize the ContactPlane after BSP returned OK.
The synthesis routed through BSPQuery.FindWalkableSphere ->
walkable_hits_sphere, which correctly rejects tangent contact via
|dist| > radius - epsilon. For a grounded player standing on or
brushing a floor, the foot sphere is tangent: 99.87% MISS rate per
the 2026-05-20 [cp-write] probe (3150 MISS / 3154 calls). Each MISS
fell through to outdoor terrain backstop, writing a ContactPlane
that's below the indoor floor by ~0.02m (the render Z-bump),
marking the player airborne and triggering the falling-animation
stuck symptom user-reported on 2nd-floor walks.
Fix: delete the synthesis + outdoor-fallthrough from the indoor OK
path. ContactPlane is retained from the prior tick's seed
(PhysicsEngine.ResolveWithTransition:583, init_contact_plane
equivalent) or refreshed by BSP Path 3 (step_sphere_down) / Path 4
(land-on-surface) during the same tick. Matches retail's
BSPTREE::find_collisions OK path (acclient_2013_pseudo_c.txt:323938).
Also deletes:
- Transition.TryFindIndoorWalkablePlane (~104 lines incl. doc-comment)
- INDOOR_WALKABLE_PROBE_DISTANCE constant
- [indoor-walkable] probe log line
- IndoorWalkablePlaneTests.cs (8 tests, the helper's coverage)
- TransitionTypesTests.cs (1 test, also tested the helper)
Net: -491 lines. BSPQuery.FindWalkableSphere + its 5 unit tests
retained as the underlying retail-faithful walkable-finder API
(reachable for spawn-placement / teleport-verification / future
debug needs; its doc-comment is updated to reflect the change).
Closes Bug A in the indoor ContactPlane retention phase.
Spec: docs/superpowers/specs/2026-05-20-indoor-walkable-synthesis-removal-design.md.
Plan: docs/superpowers/plans/2026-05-20-indoor-walkable-synthesis-removal.md.
Predecessor: de8ffde (Bug B, BSP world-origin fix).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
686f27f227
commit
9f874f4650
4 changed files with 23 additions and 573 deletions
|
|
@ -1152,11 +1152,14 @@ public static class BSPQuery
|
|||
/// </para>
|
||||
///
|
||||
/// <para>
|
||||
/// Intended call site: indoor walkable-plane synthesis in
|
||||
/// <c>Transition.TryFindIndoorWalkablePlane</c> when the indoor cell-BSP
|
||||
/// collision returns OK (no wall hit) and the resolver still needs a
|
||||
/// ContactPlane to feed ValidateWalkable. Outdoor terrain has its own path
|
||||
/// (<see cref="PhysicsEngine.SampleTerrainWalkable"/>) and does not use this.
|
||||
/// Out-of-band "find a walkable plane indoors" entry point for callers
|
||||
/// that genuinely need to query a cell's walkable floor (spawn-placement
|
||||
/// validation, teleport-target verification, future debug overlays).
|
||||
/// NOT called from the per-frame physics resolver — the original
|
||||
/// per-frame caller (TryFindIndoorWalkablePlane) was deleted 2026-05-20
|
||||
/// because retail's BSPTREE::find_collisions does NOT re-synthesize the
|
||||
/// ContactPlane on the OK path. The wrapper is kept here as the
|
||||
/// underlying retail-faithful walkable-finder API.
|
||||
/// </para>
|
||||
///
|
||||
/// <para>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue