Depth sorting issues

28 views Asked by At

ll be quick.

I have a ground area with mulitple sprites on, and some of have to be ordered and i'm doing it with zIndex and also, i have an avatar that can go behind or in front of some sprites and i know that would be better to sort them by a.y - b.y; but i can't use both because it being conflicted any idea how should i structure it.

Used (PIXI.Container().sortableChildren = true and add zIndex)

Used (PIXI.Container().children.sort((a, b) => a.y - b.y

Expecting to find a way to use one of these method to fix depth sort.

0

There are 0 answers