mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Limit camera zoom in WMO interiors and improve wall collision
Reduce max zoom to 15 units when inside a building. Increase player collision radius to 0.70, lower step height threshold, and use more aggressive pushback and finer sweep steps to prevent wall clipping.
This commit is contained in:
parent
c1b998534f
commit
0f996a26f5
2 changed files with 15 additions and 7 deletions
|
|
@ -1515,9 +1515,9 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to,
|
|||
if (moveDistXY < 0.001f) return false;
|
||||
|
||||
// Player collision parameters
|
||||
const float PLAYER_RADIUS = 0.55f; // Slightly wider for better wall collision
|
||||
const float PLAYER_RADIUS = 0.70f; // Wider radius for better wall collision
|
||||
const float PLAYER_HEIGHT = 2.0f; // Player height for wall checks
|
||||
const float MAX_STEP_HEIGHT = 0.85f; // Balanced step-up without wall pass-through
|
||||
const float MAX_STEP_HEIGHT = 0.70f; // Lower step height to catch more walls
|
||||
|
||||
// Debug logging
|
||||
static int wallDebugCounter = 0;
|
||||
|
|
@ -1636,7 +1636,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.02f;
|
||||
float pushDist = PLAYER_RADIUS - horizDist + 0.08f; // More aggressive pushback
|
||||
glm::vec2 pushDir2;
|
||||
if (horizDist > 1e-4f) {
|
||||
pushDir2 = glm::normalize(glm::vec2(delta.x, delta.y));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue