Add WoW-style camera system with collision and first-person mode

- Implement orbit camera with smooth zoom and collision detection
- Add 50° slope limiting with sliding (prevents mountain climbing)
- Add first-person mode that hides player model and weapons
- Add floor clearance check to prevent camera clipping through ground
- Improve WMO wall collision with proper height range checks
- Add two-sided floor collision detection for WMO geometry
- Increase M2 render distance slightly for better visibility
This commit is contained in:
Kelsi 2026-02-03 14:26:08 -08:00
parent 3e792af3e5
commit 54dc27c2ec
7 changed files with 307 additions and 64 deletions

View file

@ -364,7 +364,7 @@ void M2Renderer::render(const Camera& camera, const glm::mat4& view, const glm::
lastDrawCallCount = 0;
// Distance-based culling threshold for M2 models
const float maxRenderDistance = 300.0f; // Reduced for performance
const float maxRenderDistance = 400.0f; // Balance between performance and visibility
const float maxRenderDistanceSq = maxRenderDistance * maxRenderDistance;
const glm::vec3 camPos = camera.getPosition();