From 3bb00960097a731902bfc18207189cc6d3514c2b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 7 Feb 2026 16:03:26 -0800 Subject: [PATCH] Tighten wall collision thresholds to catch curbs and tunnel walls Lower MAX_STEP_HEIGHT from 1.0 to 0.6 so curb walls aren't skipped. Tighten ramp and short surface filters (0.8 height threshold instead of 1.2-1.5) to prevent clipping through tunnel entrance geometry in Stormwind. --- src/rendering/wmo_renderer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index 84d56cd5..cade789a 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -1744,7 +1744,7 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, // Player collision parameters const float PLAYER_RADIUS = 0.70f; // Wider radius for better wall collision const float PLAYER_HEIGHT = 2.0f; // Player height for wall checks - const float MAX_STEP_HEIGHT = 1.0f; // Allow stepping up stairs + const float MAX_STEP_HEIGHT = 0.6f; // Allow stepping up stairs (lowered to catch curbs) glm::vec3 queryMin = glm::min(from, to) - glm::vec3(8.0f, 8.0f, 5.0f); glm::vec3 queryMax = glm::max(from, to) + glm::vec3(8.0f, 8.0f, 5.0f); @@ -1852,11 +1852,11 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, // Skip low geometry that can be stepped over if (triMaxZ <= localFeetZ + MAX_STEP_HEIGHT) continue; - // Skip ramp surfaces (facing mostly upward) that are low - if (normal.z > 0.50f && triMaxZ <= localFeetZ + 1.2f) continue; + // Skip ramp surfaces (facing mostly upward) that are very low + if (normal.z > 0.60f && triMaxZ <= localFeetZ + 0.8f) continue; - // Skip short vertical surfaces (stair risers) - real walls are tall - if (triHeight < 1.2f && triMaxZ <= localFeetZ + 1.5f) continue; + // Skip very short vertical surfaces (stair risers) + if (triHeight < 0.6f && triMaxZ <= localFeetZ + 0.8f) continue; // Swept test: prevent tunneling when crossing a wall between frames. if ((fromDist > PLAYER_RADIUS && toDist < -PLAYER_RADIUS) ||