Make objects only visible when looking into a cylinder and not from the outside.

Hey everyone, I’m looking into a solution that will allow me to look into a cylinder such as a circular trash can but from the outside of the can and the contents inside would be invisible. All this has to work on a mobile phone.

Any help is appreciated!

Let’s think about the top of the cylinder like a circle surface, check the intersection point made by the line from camera view to world position of the box and the circle surface, if the distance from the intersection to the circle center <= circle radius, then return value 1. If not, return value 0, then pass it to opacity channel. You should ask this question on graphic section.

Hello, you need either a ‘Spyglass’ effect or a PORTAL! I remembered seeing a free portal plugin out there and i found it again…

If you don’t want to use it as a doorway, you can probably delete that part as connected to an ‘when overlap begins’ as the portal is independant and can be seen from far away.,. Anyways the video seem to show what you are looking for,. It says it was built last on 4.18,. but i downloaded and was able to get *** to load into 4.24 without any problem,. (right click .uprojectr file choose ‘switch Unreal Engine version’ then open file and it should build if you have Visual Studio installed with Unreal game commponent and C++ Gaming component…

I made an inventory system that has a wrist slot that uses that effect, if you go on my website and look at the inventory system there is a video showing it in action. Is that what you are after?

What you’re looking for exists out of the box in the engine. In your material editor look for cylinderIntersection. Chris murphy breaks it down about half way through this video: Getting Started with Technical Art in Unreal Engine 4 with Chris Murphy (Unreal Engine Evangelist) - YouTube