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

Unexpected tiles overlap on a repetitive pattern #54006

Closed
gustavi opened this issue Oct 19, 2021 · 5 comments
Closed

Unexpected tiles overlap on a repetitive pattern #54006

gustavi opened this issue Oct 19, 2021 · 5 comments
Labels

Comments

@gustavi
Copy link

gustavi commented Oct 19, 2021

Godot version

v4.0.dev.20211015.official [f113dc9]

System information

Windows 10

Issue description

Tiles overlap on a repetitive pattern (right and left on the following screenshot):

image

Steps to reproduce

Using the tile in reproduction project (isometric, 100x226 where the "ground zone" is 100x200):

  1. Create a Scene (Control in my example, you can change the Scale to x=0.5,y=0.5 to get more information on screen)
  2. Create a TileMap
  3. Add a new TileSet
  4. Change the Tile Shape of this TileSet to Isometric
  5. Change the Tile of this TileSet to x=200,y=100 (image 1)
  6. On TileSet add a new Atlas
  7. Set the Texture with tile in reproduction project (Answer No if Godot ask to auto generate tile)
  8. Change Texture Region Size to x=200,y=126 (image 2)
  9. On tile properties update the Texture Offset to x=0,y=-26 (image 3)
  10. Draw tiles and reproduce the bug (image 4)

image

image

image

image

Minimal reproduction project

tile_bug.zip

@Calinou
Copy link
Member

Calinou commented Oct 19, 2021

cc @groud

@groud
Copy link
Member

groud commented Oct 19, 2021

This is an expected behavior. TileMap is using different quadrants, which are different CanvasItems that are drawn in batches.
If you need to add a vertical depth to Isometric tiles like you are doing now, you need to enable Y-sorting on your layer.

@groud groud closed this as completed Oct 19, 2021
@groud groud removed this from the 4.0 milestone Oct 19, 2021
@gustavi
Copy link
Author

gustavi commented Oct 19, 2021

Are you talking about this ?

image

I don't see any change but may be I checked the wrong option.

@groud
Copy link
Member

groud commented Oct 19, 2021

Yes, but you also need to enable it on the TileMap node itself. In the Node2D/Ordering category.

@gustavi
Copy link
Author

gustavi commented Oct 19, 2021

OK thank you. It was not obvious at all. New tiles editor is really cool but much less intuitive than the old one.

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

No branches or pull requests

3 participants