Best way to remove gun clipping?

I’m working on a second fps game for mobile, and I need to remove gun clipping. I don’t want to use viewport frames because the gun won’t have any of the prooer lighting.

Just turn cancollide from true to false ine very part of your gun. Should help and fix it.

1 Like

There isn’t a way to do it without using viewportframes as far as I know.
Powering imagination

That’s the complete opposite, I need cancollide off anyways. I’m asking how to remove the gun going through the wall…

Ahh. Then the only way would be viewport to my knowledge.

Do you think moving the gun back more, the closer you are to a wall would work?

there’re few roblox games that accomplish this but some games do it. games like PUBG make it so that if you’re hugging a wall and your gun would clip through it, they rotate the viewmodel on the X axis i believe? the pitch axis basically, upwards to make it look like you’re tactically hugging the wall with your gun. this could be done with raycasts and magnitude checks from the tip of the gun to figure out how far you should tilt the viewmodel upwards.

Not sure if that would give the wanted effect, but you could try using Collision groups to make sure the gun model only collides with your walls, that way it goes through anything else but the walls

I attempted this using raycasts and CFrame.Angles()

CLIP FROM RECENT VIDEO:

1 Like

holy crap that looks so good dude, nice job! :+1:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.