Godot Version
Godot 4.3 beta1
Question
I am making a 2D top down game utilizing layered tilemaps for the game world. I have otherwise succeeded in player interaction with this environment other than y-sorting with these many layers. The player currently sorts correctly with tiles on the same z-layer and on higher z-layers, but the player’s feet sort behind the tiles on lower z-layers. The issue is illustrated below:
The reason this problem happens is because separation between tilemap layers is done by changing the y-sort offset by 16 per layer, as this is my tile size. However, this does not result in correct behavior for the ground. I have also considered incrementing the “z-index” property of different z-layers, but this once again breaks interaction with higher layers as can be seen below:
What would be a smart way to approach this problem? Some ideas I have are:
-
2D sprites in a 3D scene
-
Custom sprite overlapping using a shader