Help stopping viewmodel camera clipping

Not sure what category this needs to go in. Let me know if this is the wrong category, and I’ll definitely change it.

So right now I’m working on an fps framework for my game, and to stop the gun’s barrel clipping into walls and such, I just scaled the viewmodel down and positioned it really close to the camera. However, when I tweak the cframes, the weapon’s stock seems to clip into the camera (??), as seen in the video linked below. If anybody could help with this issue, that would be great!

Thanks to anybody helping!

1 Like

I believe there’s some voodoo magic involving ViewportFrames you can do to prevent guns from clipping into walls, but it probably sacrifices lighting and render quality.

1 Like

Yeah, this was the alternative, but I kinda need the lighting so I can’t use them. However, I know games unite uses this method for their weapons, and they don’t seem to clip. If I can’t find a solution, I’ll probably just end up using viewports, though.

1 Like

or just use IK

1 Like

That’s not the issue. If you see the stock, you can see it clipping back into the camera (culling) (or that’s what it seems like). This is particularly visible when I aim. I pretty much just did what EgoMoose did here but instead just used :ScaleTo().