add a basic terrain layout

This commit is contained in:
2025-01-19 00:59:17 +09:00
parent 0b949683a6
commit 0a4853aff9
6 changed files with 2291 additions and 41 deletions
+1
View File
@@ -333,6 +333,7 @@ export default class Entity {
if (!this.#moving || this.#dest == null) { return false }
// TODO: bounding boxes to early discard a lot of collidables
const collidables = this.collidables()
const fixedDest = SATX.clamp(SATX.fixCollisions(this.#dest, collidables, this.radius), this.game?.width, this.game?.height, this.radius)