How to have the Camera see through Objects

I am making a game where the camera is locked at an angle and allows the player to move from only this angle. I want to populate the map with buildings, trees, etc. however these objects will block the players view of themselves.

No building obstruction:

Building obstruction:

I have tried using Invisicam, but as you can see from the second screenshot it does not work in this case.

What I am trying to do is make the building completely see through if the camera is angled inside of as the second screenshot shows.

I imagine that I will have to raycast from the camera toward the player, but I haven’t found anything similar to this to get me moving in the right direction.

Thanks!

1 Like

Maybe raycast from the camera to the player and have a while loop that checks if a part is obstructing then make that part Transparent if it is
Then add it to a global table if it’s obstructing which then you loop through to see if it’s still obstructing or can be turned back to regular transparency.

There is a method on the camera called GetObjectsObscuringTarget, you can loop through the objects return by that are making them transparent.