Reduce wall pushback and WMO camera distance

This commit is contained in:
Kelsi 2026-02-05 18:29:54 -08:00
parent b2f2ad76af
commit 85e73a2f24
2 changed files with 2 additions and 2 deletions

View file

@ -615,7 +615,7 @@ void CameraController::update(float deltaTime) {
currentDistance += (userTargetDistance - currentDistance) * zoomLerp;
// Limit max zoom when inside a WMO (building interior)
static constexpr float WMO_MAX_DISTANCE = 8.0f;
static constexpr float WMO_MAX_DISTANCE = 5.0f;
if (wmoRenderer && wmoRenderer->isInsideWMO(targetPos.x, targetPos.y, targetPos.z + 1.0f, nullptr)) {
if (currentDistance > WMO_MAX_DISTANCE) {
currentDistance = WMO_MAX_DISTANCE;

View file

@ -1639,7 +1639,7 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to,
float horizDist = glm::length(glm::vec2(delta.x, delta.y));
if (horizDist <= PLAYER_RADIUS) {
wallsHit++;
float pushDist = PLAYER_RADIUS - horizDist + 0.04f;
float pushDist = PLAYER_RADIUS - horizDist + 0.02f;
glm::vec2 pushDir2;
if (horizDist > 1e-4f) {
pushDir2 = glm::normalize(glm::vec2(delta.x, delta.y));