Skip to content

Commit 66e99bc

Browse files
committed
changed a few things, preparing tiles
1 parent a7d4816 commit 66e99bc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tilemaps/components/WorldToTileXY.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)
8888
? Math.floor((worldY / (tileHeight / 2)))
8989
: (worldY / (tileHeight / 2));
9090
point.x = snapToFloor
91-
? Math.floor((worldX / tileWidth) - (point.y % 2))
92-
: (worldX / tileWidth) - (point.y % 2);
91+
? Math.floor((worldX / tileWidth) + (point.y % 2))
92+
: (worldX / tileWidth) + (point.y % 2);
9393

9494
}
9595
}

0 commit comments

Comments
 (0)