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

Multi Tiled Sprite Y Sort Order not working correctly #71257

Open
KHawk63 opened this issue Jan 12, 2023 · 2 comments
Open

Multi Tiled Sprite Y Sort Order not working correctly #71257

KHawk63 opened this issue Jan 12, 2023 · 2 comments

Comments

@KHawk63
Copy link

KHawk63 commented Jan 12, 2023

Godot version

4.0 Beta 11 & 10

System information

Windows 10 64-bit, NVIDIA GeForce GTX 980, DirectX 12, version 31.0.15.1694

Issue description

When using a tile created from multiple tiles like a wall that is size 64x64 out of a 16x16. The wall will overlap with the next wall placed. But when you enable/disable y sort (or hold the enable y sort shortcut) they will show-up as expected briefly then go back to not working.

Y Sort issue

Steps to reproduce

  1. Create a new tilemap
  2. add a tilemap that has something like a wall in the issue description
  3. setup the wall so it's made out of multiple tiles 2x2
  4. place on the tilemap next to another
  5. View walls overlap unexpectedly
  6. enable y-sort on tilemap and layer
  7. view they still overlap
  8. Enable/Disable y-sort to see it fix itself, and go back to not working.

Minimal reproduction project

Y Sort issue.zip

@groud
Copy link
Member

groud commented Jan 30, 2023

Sadly, there's not really a fix for that, unless we implement a way to "X-sort" the nodes one way or another.
This requires significant changes to the rendering server.

See godotengine/godot-proposals#2838

@groud
Copy link
Member

groud commented Jan 30, 2023

I found a workaround. It's not optimal but well, better than nothing:

  • Set the TileMap as Y-Sorting
  • Rotate the TileMap by 0.1
  • Set the Node2D parent's of the TileMap as Y-sorting
  • Rotate the Node2D parent by -0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants