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
For a hex tilemap it appears you can get the case where the FilePos is equal to its bounds.
E.g. with TilemapSize { x: 10, y: 10 } you can get TilePos { x: 10, .. } and TilePos { y: 10, .. } after calling fill_tilemap_hexagon
This means that calls to TilePos::within_map_bounds will fail, causing issues such as TilePos::from_world_pos returning None even though there is a tile there.
In the example, clicking on tiles highlights them. It is expected to work for all tiles, but it does not work for the upper left edge and the right edge, as we have the case described above.
The text was updated successfully, but these errors were encountered:
Piturnah
changed the title
Bug: Hex FilePos can have its fields equal to map size
Bug: Hex TilePos can have its fields equal to map size
Sep 11, 2023
For a hex tilemap it appears you can get the case where the FilePos is equal to its bounds.
E.g. with
TilemapSize { x: 10, y: 10 }
you can getTilePos { x: 10, .. }
andTilePos { y: 10, .. }
after callingfill_tilemap_hexagon
This means that calls to
TilePos::within_map_bounds
will fail, causing issues such asTilePos::from_world_pos
returningNone
even though there is a tile there.Link to simple example: repo
In the example, clicking on tiles highlights them. It is expected to work for all tiles, but it does not work for the upper left edge and the right edge, as we have the case described above.
The text was updated successfully, but these errors were encountered: