Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spacing in ldtk is interpreted as atlas #310

Open
gusinacio opened this issue Mar 18, 2024 · 1 comment
Open

spacing in ldtk is interpreted as atlas #310

gusinacio opened this issue Mar 18, 2024 · 1 comment

Comments

@gusinacio
Copy link

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.
Screenshot 2024-03-17 at 21 05 46
Screenshot 2024-03-17 at 21 06 03
Screenshot 2024-03-17 at 21 06 22

@Trouv
Copy link
Owner

Trouv commented Mar 20, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants