We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7d4816 commit 66e99bcCopy full SHA for 66e99bc
1 file changed
src/tilemaps/components/WorldToTileXY.js
@@ -88,8 +88,8 @@ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)
88
? Math.floor((worldY / (tileHeight / 2)))
89
: (worldY / (tileHeight / 2));
90
point.x = snapToFloor
91
- ? Math.floor((worldX / tileWidth) - (point.y % 2))
92
- : (worldX / tileWidth) - (point.y % 2);
+ ? Math.floor((worldX / tileWidth) + (point.y % 2))
+ : (worldX / tileWidth) + (point.y % 2);
93
94
}
95
0 commit comments