How to approach top-down shooter building modelling


I’m building a top-down shooter game, where the player will be able to enter buildings. So I was wondering how to approach this problem. If I model the buildings as a whole, then the player won’t be able to see the player, but will be able to see the top of the building. What I want is, if someone is outside a building, then you can see the building’s roof, but when the player enters it, the roof disappears and can see through it.

Following examples:

Example #1

Example #2

Something in the following manner.

So how could one approach this problem? I heard there are PostProcessing materials with custom depth that could achieve something similar but I have no knowledge of them. Or another solution would be having an actor of a building, with two separate models. One the body of the building and second roof. And when the player overlaps it, the roof will hide it’s visibility. End on exit will reenable it.

Any better solutions?

Maybe you can use a trigger volume that changes the material for the roof to a fully transparent one when the player enters the bounds of the building?

I’d agree with SE_JonF there. Make a blueprint that has a trigger volume and actor references you can link to the blueprint. When the player enters the trigger volume, hide the actors. Alternatively you could fade them out using opacity and a material instance.

Hmm, thanks, wonder which one is better performance wise.