From 9090fb8727525c72450483ea2596862b7660177d Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 8 Feb 2026 20:39:25 -0800 Subject: [PATCH] Fix jump snap-down: only ground when velocity is non-positive Removed the '|| *groundH > feetZ' condition that was snapping player to ground during upward jumps when ground was above current position. Now only grounds when vertical velocity is <= 0 (falling or landing), preventing premature grounding during jump arc. --- src/rendering/camera_controller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rendering/camera_controller.cpp b/src/rendering/camera_controller.cpp index 56301d5a..603409f6 100644 --- a/src/rendering/camera_controller.cpp +++ b/src/rendering/camera_controller.cpp @@ -541,8 +541,7 @@ void CameraController::update(float deltaTime) { // WoW-style: snap to floor if within step-up or fall-catch range, // but only when not moving upward (jumping) - if (dz <= stepUp && dz >= -fallCatch && - (verticalVelocity <= 0.0f || *groundH > feetZ)) { + if (dz <= stepUp && dz >= -fallCatch && verticalVelocity <= 0.0f) { targetPos.z = *groundH; verticalVelocity = 0.0f; grounded = true;