How do I get my gun to not go through the walls?

I think capsule trace would be even better here