I'm trying to use YSort with a player and some objects created from tiles in a tilemap.
The objects are constructed from individual tiles deliberately, and I'd like to keep this set up if possible.
I've uploaded a simple example project here. The arrow keys move the player.
I have a wardrobe that is 3 tiles high. It doesn't completely occupy 3 tiles, and is slightly set back within the bottom tile to make it appear as though it is pressed against a wall. I've drawn a blue line at the bottom of the tile to show where it is. The player is of a similar height, and I've drawn a red line to represent the player's feet.
The origin of the player is at its feet, and the tilemap is set to have its origin in the bottom left.
YSort compares the bottom of the tile (i.e. the blue line) against the bottom of the player (i.e. the red line), leading to situations like this:
What I want is to set the Y coordinate that the tile uses for YSort to the bottom of the wardrobe, but I can't work out how to do it. Is it possible?
I've seen lots of people talking about using the Tex Offset property to fix situations like these, but I don't understand how that would apply in this case. Changing the Tex Offset moves the wardrobe sprites down (and away from the wall), and defeats the point of offsetting them within the tileset image in the first place.