Closed janos-r closed 1 year ago
Let me underline that the issue is not just the one-line shift, but that it is not possible to workaround by selecting a 2x2 one line lower. When you select a 2x2 starting from line 3, such a 2x2 would be loaded correctly. So any 2x2 on an intersection of a theoretical 2x2 grid is impossible to select.
Thanks for the detailed report - I think this is the same issue as #105, which I originally wanted to address before 0.5 but didn't get around to it.
Still happens in 0.8
Have you tried #[sprite_sheet_bundle(no_grid)]
? It will basically use a texture atlas with only 1 rectangle pointing to the region specified by the editor visual
bevy_ecs_ldtk: 0.5 ldtk editor: 1.2.3
Short summary: When choosing a 2x2 tile sprite from the sheet, the library loads the correct tiles only under the assumption, that all the sprites in this sheet are made in the same size. But such a sheet would be effectively always selected as 1x1. In other words, choosing a sprite from several tiles is currently broken.
Example from the current platformer: 1) Choose a 2x2 selection for the chest entity. But don't select from the first or third line. Select a 2x2 starting on the second, third or any other odd line. Note: The pritesheet used here has the first line empty.![image](https://user-images.githubusercontent.com/30606201/211396932-d98b3d86-e902-4226-83b1-58513dc5d7e7.png)
2) save and load the platformer - the sprites loaded will be shifted one line higher.![image](https://user-images.githubusercontent.com/30606201/211397171-ea2f586e-7544-427f-bb33-52954f2e34c4.png)
This is not an issue when selecting only 1x1 tiles, but it makes it impossible to use a sheet set like this:
That is how I encountered this issue. When loading the torii gate, you shift one line up. The same goes for most of the houses that are not starting on the first line.
Thank you for your consideration.