Jump to content

Pixi layer issue


Bill
 Share

Recommended Posts

Hello,

I'm new to using pixi and am creating a tile based game but am having a few issues with layers & zIndex I'm hoping someone can assist with!

On top of each tile may have different sprites that are created from a spritesheet. Each layer can have different zIndexs. Each layer is added as a child to a container then that container is added to a collision map.

I then have a different container that contains sprites to generate a avatar, that container is then also added to the collision map.

I'm trying to have a layer from the spritesheet with a zIndex to appear on top of the avatar, but not all layers, just layers that contain a zIndex. In other words, lets say that item is a chair, the arm of the chair should appear on top of the avatar while the back of the chair is behind them. Here is a terrible paint example of what I'm trying to accomplish:

 dv98iBP.png

 

I currently am able to walk behind the sprite and appear behind it, my issue starts when i want to be on top of the sprite but have a layer appear above the avatar.

Thank you in advance!

 

 

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.

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

  • Recently Browsing   0 members

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