layers: Children don't undermine their parents

So I’m experiencing this problem right now:

screen shot 2018-09-21 at 10 35 03

[1-Major] Basically, no matter what I tried, I couldn’t make childrens of a sprite, appear below the sprite (they are on the same layer, aka, PIXI.DisplayGroup) - so basically I want wings to appear behind the body, but just doesn’t happen

[2-Minor] I had pixi-layers 0.1.7 - now I got the latest 0.1.7 - it’s a lengthier one, has some sortPriority code - I tried setting it to several places but didn’t change anything - I think the version should’ve increased it at one point, to 0.1.8

[3-Major-Opinion-Request] I could solve this problem with tools at hand, make the body a children of the container, rather than the container itself, but looking for the optimal solution, I also apply filters to the body, I want the additional parts like the head etc. to have the filters too, if they were actually one Sprite, this would be the case, but I’m guessing there’s no actual solution to this problem now? Example: If I applied an outline filter to sprites, the head and body will be outlined individually now?

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

Well If you started your own Patreon, I’d join 😃

Other than that, my capabilities are beyond it, if it will be a long living bug, I’d probably work around it - for this specific occurrence, I think it’d be better if I turned the Sprite itself into a Container, and manually sort things inside, it’s a better solution anyway

But I do come up with a lot of weird in-between stages in development that calls for having the child and parent having the same layer, for example, think of a small ball circling around a player object, someone using pixi-layers could just want to experiment with such a thing, and would stumble onto this bug again

You sometimes just want to add something to a Sprite, and practically make it appear under the Sprite, you know, even if it’s a child