how do i make an object disappear in front of the camera?

Hello everyone! I have a question, how can I make an object disappear in front of the camera? This tree for example, how do I make it so that when I approach the tree it is partially invisible so that I can see only the character and the area of the ground next to it? The same would apply when I entered a house, removing only the roof of the house. I’m using the TopDown model.

Sorry bro, I am so tired. So I am going to leave this here. Anyone in the future who else needed help, please use this “guide”: guide