send help
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user