Achieving a proper First Person Shooter Camera

By proper I mean being able to collide with some thing and not have the weapon model go through the wall.