use obstacle-in-path pathfinding

This commit is contained in:
2025-01-17 13:01:47 +09:00
parent 597aa204de
commit 20f8a2f1fe
7 changed files with 138 additions and 70 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ export default class Projectile {
(this.game?.entities ?? []).filter((e) => e.id != this.id).forEach((e) => {
if (e.id == this.owner?.id) { return }
if (SATX.collideObject(this.collider(), e.collider)) {
if (SATX.collideObject(this.collider(), e.collider())) {
this.onCollide(this, e)
}
})