Jump to content

Phaser.Isometric - calculating world bounds based on "Tilemap" group


Recommended Posts

I see the plugin's a bit dormant ATM, I think, but perhaps you guys have had enough experience to answer what _seems_ like a simple question:

Given I have a Phaser.Group() of Isometric.ISOSprite() acting as the 'floor' tile-map, is it possible to constrain the state's bounds based on this Group? The group will be dynamic so the number of sprites will change. I had initially thought simply going:

game.world.setBounds(myGroup.x, myGroup.y, myGroup.width, myGroup.height);

would work, but of course those coordinates don't accurately reflect the 'true' dimensions of the isometric grid, given the plugin projects the coordinates. I tried a couple of guess/combinations, but I always got 'weird' bounds as a result. Any ideas? Hopefully the answer's simple!

Link to comment
Share on other sites

  • 5 weeks later...

I can only make the ground square, the map appears square, even if you put different sides. I put the width equal to 2 multiplied by the Cartesian width, this results as if it had multiplied by 0.866 (cosine of 30).

I create the ISO map with the Tiled then change to orthogonal and change the width to 32 pixels, then use the Phaser game.add.tilemap and the game.add.isoSprite of the Isometric plugin to show it.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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