From 94f38fab8c9e7a11fa5a49255621ad7e94506e75 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Tue, 26 Nov 2024 20:50:27 -0600 Subject: [PATCH] fix: Issue with sparse hash grid not using the correct bounds sometimes --- src/engine/Collision/Detection/SparseHashGrid.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/Collision/Detection/SparseHashGrid.ts b/src/engine/Collision/Detection/SparseHashGrid.ts index 6a7af7abb..ce513d2ae 100644 --- a/src/engine/Collision/Detection/SparseHashGrid.ts +++ b/src/engine/Collision/Detection/SparseHashGrid.ts @@ -72,6 +72,13 @@ export class HashGridProxy { } } + /** + * Update bounds of the proxy + */ + updateBounds(): void { + this.bounds = this.object.bounds; + } + /** * Updates the hashed bounds coordinates */ @@ -153,6 +160,7 @@ export class SparseHashGrid