2D RPG 3/4 top-down - Rendering order and elevation
Hello,
I've got an issue similar to this one: https://forum.unity3d.com/threads/dynamic-draw-order-or-2d-z-buffer.220231/#post-1475523 To sum up, to manage depth they use "y" as the rendering sorting order value whithin a layer.
This solution isn't enough for me, because I want to be able to manage elevation in my game. For example, if the player is on a cliff, I want him to be rendered in front of the tree behind the cliff, even if the "player y" and "tree y" would give the contrary with the previous method.
If anyone has an idea to handle this, easy to implement and with good performances... (An algorithm or even a plugin)
May be the solution could be to use different layers according to the elevation? But it seems quite complicated and I dunno if it's possible to change player's layer.
Thanks guys!
I join a little drawing to explain it better.
PS: sorry for my poor english :)