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

Mask and masked game objects in container #6177

Open
rexrainbow opened this issue Jul 26, 2022 · 3 comments
Open

Mask and masked game objects in container #6177

rexrainbow opened this issue Jul 26, 2022 · 3 comments
Assignees
Milestone

Comments

@rexrainbow
Copy link
Contributor

Version

  • Phaser Version: 3.55.2
  • Operating system: win10
  • Browser: chrome, firefox

Description

Here is the test code. There are two game objects, a Graphics game object to create mask, apply this mask to another image game object.

  • Disable line22-24 : These game objects are added to display list of scene, works well.
  • Enable line22-24 : Put these game object into a container, the mask area is not correct.

I guess that mask will be applied in world position/scale/angle, not local position/scale/angle of container.
So mask source game object (Graphics game object, in this case) ought to set position/scale/angle from container to world, under render method, then reverse these properties back.

@photonstorm
Copy link
Collaborator

This issue has been mentioned on Phaser. There might be relevant details there:

https://phaser.discourse.group/t/moving-mask-in-container-issue/5095/7

@DanLCD
Copy link

DanLCD commented May 24, 2023

Any progress on this? It's still present on 3.60

@woshisheji
Copy link

如果条件允许的话,我觉得把mask部分的组件用官方容器重构一下应该就可以了。

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

6 participants