Fix corner and ramp collision clipping

- Remove early-out in wall collision so multiple wall faces are resolved
  per frame, preventing corner clip-through
- Update localTo after each wall push so subsequent triangles check
  against the corrected position
- Tighten collision sweep steps from 0.65 to 0.35 units (max 5 steps)
  for better tunneling prevention on thin walls and corners
This commit is contained in:
Kelsi 2026-02-07 17:13:09 -08:00
parent 87aaa30eed
commit 4a932dd8cd
2 changed files with 11 additions and 7 deletions

View file

@ -430,7 +430,7 @@ void CameraController::update(float deltaTime) {
float moveDist = glm::length(desiredPos - startPos);
if (moveDist > 0.01f) {
int sweepSteps = std::max(1, std::min(3, static_cast<int>(std::ceil(moveDist / 0.65f))));
int sweepSteps = std::max(1, std::min(5, static_cast<int>(std::ceil(moveDist / 0.35f))));
glm::vec3 stepPos = startPos;
glm::vec3 stepDelta = (desiredPos - startPos) / static_cast<float>(sweepSteps);