J4G

Struggling with layering in Phaser

Recommended Posts

I'm creating a game with many types of tiles. Each tile type has different properties that I'm customizing: it's texture, layering, and collision. These are all determined separately. In the interest of making my P2 life easy, I have two tile groups, collision and no-collision. The tiles that collide with the player are placed in one and the others go into the other.

 

The problem is, as I mentioned before, my game is pretty layering-intensive. As of right now I haven't found a way to have individuals tiles within a group have an index independent of their parent group's. This makes sense of course, especially when you're familiar with the Pixi renderer. That doesn't really solve my problem however. Does anyone know of a way in which I can keep my collision groups separate from my layering? I would love, love, love if Phaser 3 had some sort of Z-index setter as well- manipulating everything through bringToTop() is pretty difficult.

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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.