fix weird grid bug

This commit is contained in:
RandomityGuy 2024-06-12 21:58:26 +05:30
parent 0b899d99ef
commit 74c5cf391e
2 changed files with 2 additions and 2 deletions

View file

@ -1959,7 +1959,7 @@ class Marble extends GameObject {
function calculateNetSmooth() {
if (this.netCorrected) {
this.netCorrected = false;
this.netSmoothOffset.load(this.lastRenderPos.sub(this.oldPos));
this.netSmoothOffset.load(this.lastRenderPos.sub(this.oldPos).sub(this.velocity.multiply(0.032)));
// this.oldPos.load(this.posStore);
}
}

View file

@ -107,7 +107,7 @@ class Grid {
surf.key = searchKey;
if (searchbox.containsBounds(surf.boundingBox) || searchbox.collide(surf.boundingBox)) {
foundSurfaces.push(surf);
surf.key = 1;
surf.key = searchKey;
}
}
}