mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-26 21:13:51 +00:00
Reduce wall pushback and WMO camera distance
This commit is contained in:
parent
a1d831f6d1
commit
3929df7ed0
2 changed files with 2 additions and 2 deletions
|
|
@ -615,7 +615,7 @@ void CameraController::update(float deltaTime) {
|
||||||
currentDistance += (userTargetDistance - currentDistance) * zoomLerp;
|
currentDistance += (userTargetDistance - currentDistance) * zoomLerp;
|
||||||
|
|
||||||
// Limit max zoom when inside a WMO (building interior)
|
// 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 (wmoRenderer && wmoRenderer->isInsideWMO(targetPos.x, targetPos.y, targetPos.z + 1.0f, nullptr)) {
|
||||||
if (currentDistance > WMO_MAX_DISTANCE) {
|
if (currentDistance > WMO_MAX_DISTANCE) {
|
||||||
currentDistance = WMO_MAX_DISTANCE;
|
currentDistance = WMO_MAX_DISTANCE;
|
||||||
|
|
|
||||||
|
|
@ -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));
|
float horizDist = glm::length(glm::vec2(delta.x, delta.y));
|
||||||
if (horizDist <= PLAYER_RADIUS) {
|
if (horizDist <= PLAYER_RADIUS) {
|
||||||
wallsHit++;
|
wallsHit++;
|
||||||
float pushDist = PLAYER_RADIUS - horizDist + 0.04f;
|
float pushDist = PLAYER_RADIUS - horizDist + 0.02f;
|
||||||
glm::vec2 pushDir2;
|
glm::vec2 pushDir2;
|
||||||
if (horizDist > 1e-4f) {
|
if (horizDist > 1e-4f) {
|
||||||
pushDir2 = glm::normalize(glm::vec2(delta.x, delta.y));
|
pushDir2 = glm::normalize(glm::vec2(delta.x, delta.y));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue