mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Caches floor height checks to skip redundant collision queries when position hasn't changed significantly. Major performance improvement during movement. Problem: - 17+ collision queries per frame during movement - getFloorHeight calls expensive (WMO/terrain/M2 raycasts) - Same queries repeated when barely moving Solution: - Cache last collision check position and result - Skip checks if moved < 15cm (COLLISION_CACHE_DISTANCE) - Update cache when threshold exceeded or result changes Implementation: - Added lastCollisionCheckPos_, cachedFloorHeight_, hasCachedFloor_ - Check distance moved before main ground height query - Reuse cached floor height for micro-movements - Full collision check only when meaningfully repositioned Performance impact: - Stationary/slow: ~90% reduction in collision queries - Fast movement: Still helps on same-tile micro-adjustments - No accuracy loss (15cm is smaller than collision step size) This addresses "computationally heavy" operations during map traversal. |
||
|---|---|---|
| .. | ||
| camera.hpp | ||
| camera_controller.hpp | ||
| celestial.hpp | ||
| character_preview.hpp | ||
| character_renderer.hpp | ||
| clouds.hpp | ||
| frustum.hpp | ||
| lens_flare.hpp | ||
| lightning.hpp | ||
| loading_screen.hpp | ||
| m2_renderer.hpp | ||
| material.hpp | ||
| mesh.hpp | ||
| minimap.hpp | ||
| performance_hud.hpp | ||
| renderer.hpp | ||
| scene.hpp | ||
| shader.hpp | ||
| skybox.hpp | ||
| starfield.hpp | ||
| swim_effects.hpp | ||
| terrain_manager.hpp | ||
| terrain_renderer.hpp | ||
| texture.hpp | ||
| video_player.hpp | ||
| water_renderer.hpp | ||
| weather.hpp | ||
| wmo_renderer.hpp | ||
| world_map.hpp | ||