Possible? solutions for first-person camera object occlusion (clipping)

Hello!!! Look at the video first to understand the implication.

So, while working on my project, I stumbled upon something interesting. I’m using the FE Guns system, which creates a viewmodel inside the camera in the workspace.

The key detail is that the object physically exists in the world, rather than being rendered on top of everything like it usually is in shooters. Because of this, if you get too close to another object, your “hands” can clip into it.
Like here:

So here’s the interesting part I found a strange behavior that doesn’t seem to be talked about much (correct me if I’m wrong, but I think this could be useful).

If you set a Part’s Transparency to 1, but keep its textures non-transparent, then any objects that have transparency will still be occluded by those textures.
As you see, its actually translucent:

Because of this, I think it’s possible to achieve proper object occlusion, even if it’s a bit of a weird solution, but a working one. :alien_monster:

2 Likes

I couldn’t replicate the thing you did but you can also just use Highlight object or ImageLabel inside SurfaceGui to achieve the same thing.

1 Like

try researching “Viewport Frames,” they essentially allow you to render objects inside of a GUI. if you overlay the gui over the whole screen then you can just render your stuff on top of anything… as far as i know. lmk how it goes

3 Likes

you can just scale the gun model down

1 Like