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

SetTexture does not update hitarea #6144

Closed
rexrainbow opened this issue Jun 17, 2022 · 1 comment
Closed

SetTexture does not update hitarea #6144

rexrainbow opened this issue Jun 17, 2022 · 1 comment

Comments

@rexrainbow
Copy link
Contributor

Version

  • Phaser Version: 3.55.2
  • Operating system: win11
  • Browser: Chrome, firefox

Description

When texture size changed by setTexture method, hitarea does not update with this new texture size.

Example Test Code

Test code

  1. Create an image with 64x64 texture size, set hitarea with current texture size 64x64
  2. Change texture and new texture size is 32x32.
  3. Click between 32x32 and 64x64 area, the pointerdown event will fire.

Zone game object will change hitarea.width, hitarea.height when resizing, might need update hitarea with new texture size when setTexture().

@rexrainbow
Copy link
Contributor Author

Issue closed due to PR merged

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