![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Crim_Sun |
I’m working on a 2.5d type game using a 2d scene and tilemaps. But in godot 4.0 I’m running into a sorting issue where I’m unable to set where the sort point should be on a tile that is mix of multiple tiles.
An example of this is a wall that takes up 4 typical sprites instead of 1. So when I place the walls next to each other they’re sorting incorrectly behind each other. Normally I could just setup the Y sort Origin to bottom right and this problem would be fine. But in godot 4.0 Beta 10 there doesn’t seem to be an option or way to do this.
So I’m hoping there is an easy way to do this without having to just make this a sprite that has to be placed instead of using the tilemap feature as it’s been heavily improved in godot 4.
Thanks
Normally I could just setup the Y sort Origin to bottom right and this problem would be fine. But in godot 4.0 Beta 10 there doesn’t seem to be an option or way to do this.
I don’t have Godot 4.0 in front of me ATM, but I think you should still be able to do this. Does this post (and the associated screen shots) help at all?
jgodfrey | 2023-01-04 21:50
It does not, sadly. Sorting between other objects is working fine, so I’m pretty sure I have all the y sorting orders setup. But when needing to sort between large objects like itself. It doesn’t seem to work correctly.
Crim_Sun | 2023-01-05 03:16
I removed the z index from the layer I was putting the walls. But this still didn’t seem to fix the issue. It did make me realize whenever I edit that, or the y sort checkbox…it shows the walls sorting correctly for a brief second before going back to being busted. So I’m starting to hope and think this is just a bug with this version of godot 4.0
Crim_Sun | 2023-01-06 22:51
You could take a look at the current, related bug reports to see if something sounds similar. Here’s a start…
Issues · godotengine/godot · GitHub
Note there’ll be both an “Open” and a “Closed” tab there to look at…
jgodfrey | 2023-01-06 23:09
I didn’t see anything on the bug report list, so went ahead and made my own which is posted here.
Multi Tiled Sprite Y Sort Order not working correctly · Issue #71257 · godotengine/godot · GitHub
Crim_Sun | 2023-01-12 03:21
groud took a look at the bug, and left the following information. Sadly, there isn’t a engine side fix for this planned atm.
Groud:
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:
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
Crim_Sun | 2023-01-30 15:12