Fix camera snapping to floors above player in WMO buildings

Removed +3.0f offset from camera WMO floor query. The offset combined
with the +2.0f allowAbove in getFloorHeight was detecting floors 5 units
above camera, causing snaps to upper stories. Camera now queries at its
actual Z position to only detect reachable floors.
This commit is contained in:
Kelsi 2026-02-08 20:10:40 -08:00
parent 36834332eb
commit 85ff6234cb

View file

@ -665,7 +665,7 @@ void CameraController::update(float deltaTime) {
camWmoH = cachedCamWmoFloor;
} else {
camWmoH = wmoRenderer->getFloorHeight(
smoothedCamPos.x, smoothedCamPos.y, smoothedCamPos.z + 3.0f);
smoothedCamPos.x, smoothedCamPos.y, smoothedCamPos.z);
cachedCamWmoFloor = camWmoH;
hasCachedCamFloor = true;
lastCamFloorQueryPos = smoothedCamPos;