I am working on a 2D isometric shooter but wanting some help on what the best way would be to show the player behind other sprites. E.G. of a player walks behind a house.
At the moment what I have set up is having houses/walls not have any collision but have a hitbox and another sprite which acts as a barrier that I can place to act as if you can’t just fully walk through the building. I have a condition that checks the players Y position to the house/walls and is player overlapping the house/wall hitbox. If both conditions are true I set the visibility of the house/wall.
I’m wondering if there might be a better way of doing this? Maybe something that outlines the player, is cleaner or just something that might be more efficient.
Thank you for your reply. I think I may have not explained my question properly. So I have the z order working right with that extension. What I’m wanting to do is have it that when the player goes behind objects you can still see the character. Not have them overlap on top of the object as the way I have explained I have it I feel might not be the best way to do this
I didn’t even think about that! I’ll give that a go a little later and let you know how it turns out!
What I was thinking us having some kind of outline around the player and having the wall go transparent. But thinking about that I might be able to get that outline affect with a sprite mask as well if I make it right.
Thank you again. I will make this as solved once I get a chance to test it.