I have these wall tiles on my project, and I am trying to figure out how to properly render the player and other objects in front and behind them depending on where they are.
I thought it would make sense for the player to be able to go behind the top walls, so I removed collision for the top part of it:
The problem is I’m not sure how to render objects in front of walls when under them and behind when they are hiding behind the top parts.
changing the transparency sort axis alone doesn’t seem to help:
compare.png
I was thinking maybe to change the player’s layer dynamically through code, but there’s instances where the player touches both the bottom and top parts of a wall. so changing the layer could not work on small spaces.
Only thing I can think of to solve this would be putting all the top wall tiles on a different grid : / which might mess everything up since I’m building the walls using a rule tile.




