I'm making a 2D top-down game and to arrange all the tiles and objects I'm using the YSort. Some of the tiles represent small objects that can be on pieces of furniture of different sizes or even on the floor. However, depending on these scenarios the rendering priority tends to break with YSort.
For example:
Those bottles work fine and well when they're on that counter, but
they completely break when they're on the floor.
This also happens when the piece of furniture they're on is, let's say, a shelving unit, and they are on the bottom shelf. They work perfectly fine on any other shelf.
Do I need to make a completely new TileMap to make them work or is there a way or a workaround to fix this?
Thanks in advance. <3