-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[4.0.0-rc.4] An object with interactive will block input of a container with filter no matter what #7120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Edited the title, as this issue still affects RC4. |
Something I just discovered: Normally, the |
Yet another update: It seems what I noted above has more to do with in what order the interactives get set, because the bug will also be fixed if the block is still created first, but has |
Alright, I'm almost certain that this issue is being caused (at least in part) by this: phaser/src/input/InputPlugin.js Lines 2883 to 2899 in a996562
When a container (or layer) is filtered, its children are not a part of the render list of the camera that pointer is associated with. So, when it tries to sort the game objects by the render order, when it comes to any objects in that list that's a child of that filtered parent, it can't find it, and so it always sorts lower than it should.
|
Updated diagnosis: I'm pretty sure at this point that the root cause of this is that the children of a filtered container/layer are only being added to the render list of the parent's filterCamera, and not the main camera that the parent is also a part of. I'm leaning towards believing that this is a bug, unless I'm given an explanation for otherwise. |
Uh oh!
There was an error while loading. Please reload this page.
Version
Description
I encountered an issue where, when you:
Then the latter game object will block any input to the container wherever they overlap, no matter what its depth is.
Example Test Code
https://phaser.io/sandbox/VRAP86wU
Additional Information
Explanation of the sandbox
The red rectangle on the left has no filter or anything. It behaves as expected.
The red rectangle on the right is inside a container which DOES have a filter (colormatrix hue).
The blue rectangle (which is BEHIND both rectangles) with interactive blocks the input of the container with filter.
The text was updated successfully, but these errors were encountered: