From 66e99bccc658f302e3ff2fff87f212790d4f0370 Mon Sep 17 00:00:00 2001 From: Svipal Date: Sat, 14 Mar 2020 10:23:13 +0100 Subject: [PATCH] changed a few things, preparing tiles --- src/tilemaps/components/WorldToTileXY.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tilemaps/components/WorldToTileXY.js b/src/tilemaps/components/WorldToTileXY.js index c1f26168c..094558e4a 100644 --- a/src/tilemaps/components/WorldToTileXY.js +++ b/src/tilemaps/components/WorldToTileXY.js @@ -88,8 +88,8 @@ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer) ? Math.floor((worldY / (tileHeight / 2))) : (worldY / (tileHeight / 2)); point.x = snapToFloor - ? Math.floor((worldX / tileWidth) - (point.y % 2)) - : (worldX / tileWidth) - (point.y % 2); + ? Math.floor((worldX / tileWidth) + (point.y % 2)) + : (worldX / tileWidth) + (point.y % 2); } }