From a0ed3e34545545b388f8a35fdb722eb7a2b9b33b Mon Sep 17 00:00:00 2001 From: Schluffe Date: Sun, 5 Apr 2026 17:29:57 +0200 Subject: [PATCH] WIP --- engine/system/physics.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/system/physics.ts b/engine/system/physics.ts index 58a4f4b..e0303c8 100644 --- a/engine/system/physics.ts +++ b/engine/system/physics.ts @@ -351,6 +351,10 @@ export function moveAndSlide( } const time = closest.time; + // if the collider overlap already + if (time === 0) { + break; + } const scale = Math.max(0, time - 0.001); position.x += velocity.x * delta * timeLeft * scale;