• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!

3D Help! My weapon goes through walls..

I am working on a 3D FPS game, but whenever I look down or get close enough to a wall, the weapon goes into the wall/floor. What can I do to prevent this?2.png 3.png
Thanks f
Either turn off depth test when rendering the gun, or render the gun to a separate surface and overlay it.

The prior will be more efficient.

fo the reply, but whenever I use it, it makes my walls invisible and the objects outside visible through the walls