Hiding certain objects from being rendered by a SceneCapture2D component

I am trying to prototype portals similar to the Portal games. So far everything is working pretty much correctly but I can’t solve this one problem. I am using a 2D Capture component that creates a material, the material is set ot be the material of the plane that is the other portal. The 2D Capture component recreates the player cam’s location and rotation relative to the entrance portal, on the other side of the exit portal to create a false perspective. When a portal is placed on a wall the 2D Capture thus goes in or through the wall and the other portal’s material goes from looking great to suddenly being the view of a cam in a wall. Also, the portals are able to be moved in-game.

Does anyone know of any way to fix this through blueprints?

Using planes does not work when corners are taken into consideration.

I don’t fully understand the implementation but SceneCapture2D Components do have two arrays regarding visible actors. There are arrays for “Hidden Actors” and “Show Only Actors” which you can access via blueprint.

I guess you could have a collision volume on the portals that detect overlapping actors and then add them (if they have the tag “wall” for example) to the array of actors to hide.