disable collision to fix pathfinding phasing through walls

This commit is contained in:
2024-12-25 03:55:32 +09:00
parent 3bb34ed012
commit f48a6bf9aa
4 changed files with 71 additions and 28 deletions
+10
View File
@@ -52,6 +52,14 @@ app.listen(port, () => {
entity2.radius = 50
game.spawn_entity(entity2)
// const triangle = new Terrain([
// { x: 400, y: 200 },
// { x: 400, y: 600 },
// { x: 600, y: 300 },
// ])
// triangle.id = 'triangle'
// game.add_terrain(triangle)
const horseshoe = new Terrain([
{ x: 400, y: 200 },
{ x: 600, y: 200 },
@@ -107,5 +115,7 @@ app.listen(port, () => {
pole.id = 'pole'
game.add_terrain(pole)
entity1.moveAction(entity1.x + 600, entity1.y)
game.start()
})