• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

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.

d3d_set_zwriteenable(false);
fo the reply, but whenever I use it, it makes my walls invisible and the objects outside visible through the walls
 
Top