WIP
This commit is contained in:
1 parent
01d1b97fcb
commit
a0ed3e3454
1 file changed
+4
@@ -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;
|
||||||
|
|||||||
Reference in new issue
Block a user