Vertical gaps between tilemap columns [Solution: this.cameras.main.roundPixels = true;]

Recommended Posts

I searched and didn't find anything, but:

I am working from the example at: http://labs.phaser.io/view.html?src=src\game objects\tilemap\collision\csv map arcade physics.js
I thought the problem only appeared in my project, but this also happens in the in the example.

When the camera moves horizontally to follow the player, gaps appear between the columns of tiles.


Is there something that I can do to fix this? Is it something only appearing for me?

Thank you!


Share this post

Link to post
Share on other sites

Just to add: I suffered with this issue this morning (using Phaser 3.1.6) and `this,cameras.main.roundPixels = true` didn't fix it for me. In the end I used good ol' extrusion on my tiles and that solved it. Reference here: https://github.com/photonstorm/phaser/issues/3352#issuecomment-485242513

@rich mentions some other tools for creating extrusions for your tilemaps if `roundPixels` doesn't work for you.

Share this post

Link to post
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.