Skip to content

SetTexture does not update hitarea #6144

@rexrainbow

Description

@rexrainbow

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().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions