How to have occlusion mask follow character?

I’ve been going through a few tutorials but I can’t seem to get the result I want…
I want to have a sort of “lens of truth” effect from Ocarina of time but in a platformer setting - meaning instead of the occlusion mask happening at the center of the screen I’d like it to happen around the character.

The one that was most like what I needed was this…

The result I’d like

METHOD 1: is the look I am going for…
It’s a circle that projects infinitely and does not take perspective into account with the cutout…BUT it’s centered in the middle of the camera view and doesn’t work well if my character is offset from the center of the screen.

METHOD 2: Follows the character, but takes perspective into account when cutting out the circle to reveal the character…upon entering the cutout object with the material applied it shows this ugly cutout upon entering

So I guess how can I make it so that Method 1’s cutout follows the player character instead of being in the dead center of the screen? Sorry if that was long-winded I’ve been on this for a week now its been driving me nuts haha. Solo game development…yay

You can treat mask as a truncated cone, with apex at camera position and base at player position.
Then in materials you want to hide, determine if current pixel is within the cone and if not, hide it.

Hello, Thanks for the answer :slight_smile:
It currently is a cone, according to the video, but the video was pretty murky when it came to how to affix the base to the player location. It seems to just transform the vector infinitely from the center of the camera.

Figured out what I wanted…the cone sorta distorted things though - so I ended up doing it this way - its more cylindrical