Jump to content

Phaser Iso and Kenney Tiles


nazimboudeffa
 Share

Recommended Posts

These are 'proper' isometric ratio tiles, so you need to add this to your preload state, as by default the projection angle is for pixel art isometric ratio tiles:

game.iso.projectionAngle = Phaser.Plugin.Isometric.ISOMETRIC;

All you then need to do is change the spacing when you generate your tiles - 149 seems to work well:

      // create the floor tiles
      var floorTile;
      for (var xt = 0; xt <= 1024; xt += 149) {
        for (var yt = 0; yt <= 1024; yt += 149) {
          /* it should be a random with diffrent tiles */
          floorTile = game.add.isoSprite(xt, yt, 0, 'tile', 0, floorGroup);
          floorTile.anchor.set(0.5);
        }
      }

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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