I want to make a game where you see from above (lilke in ancient Zelda) but not completly. The same as in hyper light drifter. And I have an issue.
Imagine I have a house. It has a floor and a roof. I'd lije to be able to go trhough the house when the y position of the player is above the base but not above the roof. A draw will certainly be clearer.
.. _____ < - I can go normally
|_____|| <- I can go and i pass behind the house
|_____|/ <- I can't go through the house
< - I can go normally and I passe above the house
I have some ideas with a LOT of tests and while loops, but I'm sure wthere is a better way to do. Any ideas ?