spacing in ldtk is interpreted as atlas
I have a tilemap for super mario world which has 16x with 1px spacing. When use it in ldtk, it's perfect but when I export it to bevy, it's like it has been shifted 1px (like atlas). If I use the "atlas" option on ldtk, I get the same result.
Thanks for the issue. The tileset spacing in bevy_ecs_ldtk is unfortunately a little touchy. This is mainly because there isn't a perfect mapping between spacing options in LDtk and spacing options in bevy_ecs_tilemap. LDtk has spacing and padding, while bevy_ecs_tilemap has just spacing. Or, to be completely accurate, bevy_ecs_tilemap treats spacing and padding as the same thing.
Could you try adding a 1 px transparent border around your tileset so that your LDtk settings would be spacing = 1, padding = 1?
(This needs to be more clearly documented and should probably produce a warning)
Could you try adding a 1 px transparent border around your tileset so that your LDtk settings would be spacing = 1, padding = 1?
This was the solution. To be more specific, spacing and padding need to match. In my case, I had 5px spacing and needed to add 5px of padding.