Portal planes are infinite — IsCrossing only checked if positions were on opposite sides of the plane, without verifying the crossing point was near the actual portal opening. Walking 50m from a building but crossing the same plane extension triggered false indoor transitions, sinking the player into underground cell floors. Fix: FromVertices now computes centroid (average of 3 vertices) and bounding radius (max vertex distance + 2 unit padding). IsCrossing rejects crossings where both positions are further than 2×radius from the centroid. Only nearby crossings (within doorway range) trigger a transition. Also fixes jump-not-landing: the false portal transitions were producing wrong resolvedGroundZ values during the jump arc, making the landing check (candidateZ <= resolvedGroundZ) never true. 283 tests still green. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Meshing | ||
| Physics | ||
| Plugins | ||
| Terrain | ||
| Textures | ||
| World | ||
| AcDream.Core.csproj | ||