This commit is contained in:
Schluffe
2026-04-05 17:29:57 +02:00
parent 01d1b97fcb
commit a0ed3e3454
+4
View File
@@ -351,6 +351,10 @@ export function moveAndSlide(
} }
const time = closest.time; const time = closest.time;
// if the collider overlap already
if (time === 0) {
break;
}
const scale = Math.max(0, time - 0.001); const scale = Math.max(0, time - 0.001);
position.x += velocity.x * delta * timeLeft * scale; position.x += velocity.x * delta * timeLeft * scale;