bevy_ecs_tilemap icon indicating copy to clipboard operation
bevy_ecs_tilemap copied to clipboard

Fix conversions between axial and offset hex coords

Open rparrett opened this issue 2 years ago • 2 comments
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.

rparrett avatar Apr 11 '23 00:04 rparrett

I uncommented the stuff in the CI workflow that actually runs tests.

rparrett avatar Apr 11 '23 14:04 rparrett

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.

rparrett avatar Apr 18 '23 15:04 rparrett