From a503583b6b83dbf88afae9e679f73f8434f879bb Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 8 Feb 2026 18:12:52 -0800 Subject: [PATCH] The walls should not push back so violently lets make this softer --- src/rendering/wmo_renderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index e3508390..2a688464 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -2058,7 +2058,10 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, float absNz = std::abs(normal.z); if (absNz >= 0.45f) continue; - float pushDist = PLAYER_RADIUS - horizDist + 0.02f; + const float SKIN = 0.007f; // small separation so we don’t re-collide immediately + const float MAX_PUSH = 0.08f; // cap per triangle contact (tune 0.10–0.25) + float penetration = (PLAYER_RADIUS - horizDist); + float pushDist = glm::clamp(penetration + SKIN, 0.0f, MAX_PUSH); glm::vec2 pushDir2; if (horizDist > 1e-4f) { pushDir2 = glm::normalize(glm::vec2(delta.x, delta.y));