Skip to content

Commit 641a7c5

Browse files
authored
Merge pull request phaserjs#5533 from veleek/veleek/isometricfix
Fix IsometricWorldToTileXY result
2 parents e5f05fa + 40ff85b commit 641a7c5

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/tilemaps/components/IsometricWorldToTileXY.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ var IsometricWorldToTileXY = function (worldX, worldY, snapToFloor, point, camer
5050
tileWidth *= tilemapLayer.scaleX;
5151
}
5252

53-
worldX -= tileWidth / 2;
54-
5553
var x = (snapToFloor) ? Math.floor((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2) : ((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2);
5654
var y = (snapToFloor) ? Math.floor((worldY / (tileHeight / 2) - worldX / (tileWidth / 2)) / 2) : ((worldY / (tileHeight / 2) - worldX / (tileWidth / 2)) / 2);
5755

0 commit comments

Comments
 (0)