From 38e3c3665dba41c13ba2916f4af690e5f20a3720 Mon Sep 17 00:00:00 2001 From: Russo Date: Thu, 25 Dec 2025 21:29:03 -0300 Subject: [PATCH 1/3] fix camera "drift" on zoom --- src/Core/Camera.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Camera.ts b/src/Core/Camera.ts index fcd30201..cb1d375d 100644 --- a/src/Core/Camera.ts +++ b/src/Core/Camera.ts @@ -230,7 +230,7 @@ class Camera { * Update the distance. */ updateDistance() { - this.distance = this.getThreeCamera().position.distanceTo(this.targetPosition); + this.getThreeCamera().position.normalize().multiplyScalar(this.distance); } /** From 0fc181b6d6fca950711549d8894b06f54b06d783 Mon Sep 17 00:00:00 2001 From: Russo Date: Thu, 25 Dec 2025 21:29:35 -0300 Subject: [PATCH 2/3] fix tileset collision rectangle misplacing --- src/Core/Land.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Land.ts b/src/Core/Land.ts index 910b8f44..2779d6aa 100644 --- a/src/Core/Land.ts +++ b/src/Core/Land.ts @@ -123,7 +123,7 @@ export class Land extends MapElement { objCollision = { p: position, l: localPosition, - b: [a + rect.x, b + 0.5, c + rect.y, rect.width, rect.height, 1, 0], + b: [a + rect.x + rect.width / 2 - Data.Systems.SQUARE_SIZE / 2, b + 0.5, c + rect.y + rect.height / 2 - Data.Systems.SQUARE_SIZE / 2, rect.width, rect.height, 1, 0], cs: null, }; } From 6a67d57b88bec65aa3b650408677c99ce6400054 Mon Sep 17 00:00:00 2001 From: Russo Date: Thu, 25 Dec 2025 21:32:43 -0300 Subject: [PATCH 3/3] whitespace change --- src/Core/Land.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Land.ts b/src/Core/Land.ts index 2779d6aa..2c469a38 100644 --- a/src/Core/Land.ts +++ b/src/Core/Land.ts @@ -123,7 +123,7 @@ export class Land extends MapElement { objCollision = { p: position, l: localPosition, - b: [a + rect.x + rect.width / 2 - Data.Systems.SQUARE_SIZE / 2, b + 0.5, c + rect.y + rect.height / 2 - Data.Systems.SQUARE_SIZE / 2, rect.width, rect.height, 1, 0], + b: [a + rect.x + rect.width / 2 - Data.Systems.SQUARE_SIZE / 2, b + 0.5, c + rect.y + rect.height / 2 - Data.Systems.SQUARE_SIZE / 2, rect.width, rect.height, 1, 0], cs: null, }; }