Skip to content

TilemapLayer#getTilesWithinShape does not return valid results when run with Phaser.Geom.Line #5640

@hrecker

Description

@hrecker

Version

  • Phaser Version: 3.52
  • Operating system: Windows
  • Browser: Observed on Chrome and Firefox

Description

getTilesWithinShape does not return valid results when run with Phaser.Geom.Line. When a line spans two rows of tiles, tiles in the lower row can be left off of the results. It seems like the logic checking for the shape bounding box isn't valid for a line. I haven't tested with other shapes.

As an example - the tiles in the bottom row aren't returned by the function as expected.
phaserbug

Example Test Code

https://jsfiddle.net/gva74z1x/2/

Additional Information

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