StarArawn / bevy_ecs_tilemap

A tilemap rendering crate for bevy which is more ECS friendly.
MIT License
943 stars 198 forks source link

Wrong tiles placement when images height are superior to tiles height with isometric maps #511

Closed sovietsky-cyborg closed 5 months ago

sovietsky-cyborg commented 9 months ago

I try to import an isometric map from tiled, this map has tiles with size of 64 32, I use some "canyons" tiles on another layer whose size is 6496 and it seems to render well with tiled

Screenshot from 2024-02-03 22-40-42

but when i try to render this map with helper/titled.rs, i get a misplacement for canyons

Screenshot from 2024-02-03 22-28-04

In fact, it seems that the image position is rendered relative to the center of it, not the bottom, so if the image height is bigger than the tile height, it will be misplaced, it is a normal behavior ?

Sorry for the beginner's question, i am very new to bevy

StarArawn commented 9 months ago

You need to modify the rendering of the tilemap to include y-sorting. Please look at the latest examples 3d iso example.

sovietsky-cyborg commented 5 months ago

ok, this bug has happened because i didnt set any info about the offsetx/offsety which result in this misplacement

sovietsky-cyborg commented 5 months ago

so i close it