You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
just tested this using the original jsfiddle and the 3.55.0 phaser library (original repro was using 3.54.0) and I can confirm the issue still exists https://jsfiddle.net/17v3atc9/
as an additional note I noticed that a completely horizontal line is only returning the first and last tiles it intersects with when it falls on the top pixel border of the tile row (confirmed by modifying the above jsfiddle to use a horizontal line at y=16 and then modifying it so the horizontal line was at y=20). in the case of horizontal at y=16 only the tiles intersecting with the start point and end point are returned and when the line is at y=20 all the tiles along the line are returned.
Version
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.
Example Test Code
https://jsfiddle.net/gva74z1x/2/
Additional Information
The text was updated successfully, but these errors were encountered: