bevy_ecs_tilemap icon indicating copy to clipboard operation
bevy_ecs_tilemap copied to clipboard

Orientation for Tiled Hexagon map off?

Open soft-circles opened this issue 1 year ago • 2 comments

I created a Hexagon map in Tiled with a staggered odd index:

Screenshot 2023-08-21 at 5 38 16 PM Screenshot 2023-08-21 at 5 38 22 PM

And when I convert the layout with the bevy_ecs_tilemap in helpers/tiled.rs (code) the map appears incorrectly if I define the HexCoordSystem as ColumnOdd.

Screenshot 2023-08-21 at 5 38 35 PM

It appears correctly if I define the HexCoordSystem as ColumnEven:

Screenshot 2023-08-21 at 6 01 37 PM

soft-circles avatar Aug 21 '23 23:08 soft-circles

I think this behavior is somewhat "expected" because Bevy's y-axis is inverted relative to Tiled.

This was brought up previously in a stalled out PR that added support for StaggerAxis / StaggerIndex https://github.com/StarArawn/bevy_ecs_tilemap/pull/405#discussion_r1148564979 to that example, and the consensus seemed to be that it's correct to use the opposite index for column stagger when building the tilemap.

rparrett avatar Aug 22 '23 14:08 rparrett

This appears to be an asset loading error with tiled. Please remember that the tiled example is only meant to be a minimal example of how to use tiled with bevy_ecs_tilemap as such we'll not be expanding features to support things like this.

StarArawn avatar Dec 20 '23 02:12 StarArawn