Jump to content

How do you offset specific frames on a Tilemap?


Recommended Posts




I'm trying to create an isometric game.

The only trouble is that there's no magical "Hexagonal Grid" with Tilemaps.

As such, I need to offset each tile, but so far none of the properties seem to be doing anything.

Here's what i've tried so far:

map = game.add.tilemap('map', 219, 253);


layer = map.createLayer(0);


for(var y = 0; y < map.height; ++y){   

    for(var x = 0; x < map.width; ++x){

        var tile = map.getTile(x, y);

        if (tile){
            tile.Y += Math.random(0,30000);
            tile.worldY += Math.random(0,30000);
            tile.y += Math.random(0,30000);
            tile.centerY += Math.random(0,30000);




Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...