pixijs / layers

Separate the z-hierarchy of your scene tree from its canonical structure.
https://pixijs.io/layers/docs/
MIT License
224 stars 57 forks source link

Bug: PIXI Events not respecting zOrder hierarchy of PIXI Layers plugin #104

Open edev2020 opened 1 year ago

edev2020 commented 1 year ago

Current Behavior

When you click over an sprite with bigger zOrder but that was drawn before the one with smaller zOrder the click will go to the sprite with smaller zOrder instead. It looks like the PIXI native event system isn't respecting the PIXI Layers zOrder hierarchy even though "console.log(layer._sortedChildren) shows that the sprites were drawing in the right zOrder).

Expected Behavior

The click should not pass to the sprites below the clicked sprite.

Steps to Reproduce

PIXI Layers Example (Bugged): https://www.pixiplayground.com/#/edit/0ycJnTLAu3lJu4RHq3Dee PIXI Containers Example (Working fine): https://www.pixiplayground.com/#/edit/lL7_CdWFKhdzspEFjQN87

Environment

Possible Solution

No response

Additional Information

No response

JPM87 commented 1 year ago

+1 upvote

pietrovismara commented 10 months ago

Having the same issue