Adding an other mesh to the player character so the weapon won't intersect with walls

Do you have collision set up properly?