send help

This commit is contained in:
Schluffe
2026-04-15 22:47:05 +02:00
parent 9b75d41bea
commit 82bb948328
3 changed files with 5 additions and 2 deletions
+2
View File
@@ -87,3 +87,5 @@ export function isBelowAbs(vector: Vector, abs: number): boolean {
export function equals(a: Vector, b: Vector): boolean {
return a.x === b.x && a.y === b.y;
}
export const ZERO = createVector();
+3 -1
View File
@@ -20,6 +20,8 @@ const CIRCLE = Shape.Circle;
const RECT = Shape.Rect;
const POLYGON = Shape.Polygon;
const EPSILON = 0.0001;
type CollisionBuffer = {
size: number;
mask: number;
@@ -528,7 +530,7 @@ export function moveAndSlide(
break;
}
const scalar = Math.max(0, time - 0.001) * delta * timeLeft;
const scalar = Math.max(0, time - EPSILON) * delta * timeLeft;
position.x += velocity.x * scalar;
position.y += velocity.y * scalar;