How to make this Camera?

hello, im developing a game but I don’t know how to make when the player enter a house the roof becomes invisible like in this video:

There are a few ways I see you could do this.

In either scenario, you will need a Collider set to trigger directly in front of the door. You can make this quickly by just creating a simple cube under GameObject > 3D Object > Cube. This cube should probably be in the shape of the door (it should be as thick as a door, especially). You can also disable or remove the Mesh Renderer component on it. Put a script on this Cube object, calling it something like “EnterBuilding”. Inside, place the following:

void OnTriggerEnter(Collider other) { }

This is the basics. I’m not going to write code for the 2nd example, but I’ll give you the rundown:

The 1st example:

In the first example, you can create a new Layer (such as “RooftopLayer”) in your project. In your Camera, under Culling Masks, deselect this new layer. Now, in the script above, inside of the brackets, place something like this:

buildingRooftop.gameObject.layer = ((buildingRooftop.gameObject.layer == LayerMask.NameToLayer("RooftopLayer") ? LayerMask.NameToLayer("Default") : LayerMask.NameToLayer("RooftopLayer"));

This is a ternary operator. It is an if/else in one line of code. It sets the rooftop’s layer to be the opposite of what is already is (If it’s “Default”, it will become “RooftopLayer”. Vise versa).

In essence:
When your player walks into a building (and, therefore, through the Cube with its trigger), OnTriggerEnter is called. The rooftop should then be toggled visible or invisible.

The 2nd example:

The shader for the rooftop must be Standard. The mode must be Fade.
Use the example I posted above. However, instead of changing the layers and all, start a coroutine that will gradually fade out the material of the rooftop. You can get the material with GetComponent().material

Please let me know if this helped you. Writing examples like this take time, so I would appreciate it if you leave an upvote, as well as accept it as an answer if it answered your question.