Hello everyone, I get one problem today. My character should be behind a building in that position:
and in front of the building i that position:
How can I realize it?
Hello everyone, I get one problem today. My character should be behind a building in that position:
It seems that you want a lower Y position to also lower the Z position. One way to do this would be to change the sprite’s “order in layer” in code, based on the Y-coordinate. You could do this in Update, or in the handler for your character’s movement.
The nice thing about doing it this way is that it will apply to every building or other object you create in the game, not just that one. You can simplify this by setting the “order in layer” of every object equal to the negative of the Y coordinate.