Author
Topic: Making the roof invisible in a top down 2D pixel game that has multiple floors. (Read 55 times)

I am working on a 2d top down pixel game, everything is still very early in development. A good example of what i am trying to do would be something in the style of 2D Zelda games, such as A Link To The Past or Link's Awakening.

My issues are as follows. How do i make the roof of houses transition into invisible when the character goes inside them, so the character is visible to the player while inside the house? How would i do the same thing if said house has multiple floors? When the player goes inside a house i want to have only the current floor be visible without the need of loading in a new scene. So the character would go inside the house while the roof and floors above transitions to invisible. Then the character would go up the stairs and again the camera would follow without a loading screen and show the current floor.

Eventually i also wanna have underground areas, but i assume the technical aspects of having the camera follow the player underground or up a floor are the same. Since its just the player going from one layer to another, no?

I cant seem to find much information on such a thing? I have read things on camera culling, 2draycast and layers but i cant quite understand it. If anyone could point me in the right direction or give me the basics of making a roof invisible, i would appreciate it.