mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
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:
parent
87aaa30eed
commit
4a932dd8cd
2 changed files with 11 additions and 7 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue