bevy_ecs_tilemap
bevy_ecs_tilemap copied to clipboard
Fix conversions between axial and offset hex coords
trafficstars
Fixes #414
This fixes conversions between AxialPos and (RowEvenPos, RowOddPos, ColEvenPos, ColOddPos) when coordinates are negative.
See https://www.redblobgames.com/grids/hexagons/#conversions
This seems correct, but it's currently unclear to me if similar work needs to be done in the shaders.
I uncommented the stuff in the CI workflow that actually runs tests.
I can't remember if some of these offsets should differ from redblob's numbers due to bevy's coordinate system or whatever.
We should double check that before merging.