Skip to content
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

Adding game object to layer ignores any depth settings for input #5483

Closed
pr4xx opened this issue Jan 3, 2021 · 1 comment
Closed

Adding game object to layer ignores any depth settings for input #5483

pr4xx opened this issue Jan 3, 2021 · 1 comment

Comments

@pr4xx
Copy link

pr4xx commented Jan 3, 2021

Version

  • Phaser Version: 3.50.1
  • Operating system: macOS
  • Browser: Firefox

Description

I have two sprites with setInteractive. I give them a specific depth for the correct draw order because they overlap.
Without a layer, everything works as expected.
But as soon as I add the sprites to a layer (one layer for all sprites), the depth will be ignored for any input related stuff.
Check out the codepen below.

Example Test Code

https://codepen.io/pr4xx/pen/dypmWZm

There are two sprites. The first one is below the second one. But when I click the second one, the first sprite catches the input event. But ONLY when using the layer.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants