How do I check if my gun is colliding through a wall?
Asked by
8 years ago Edited 8 years ago
I'm currently making an fps and I am stumped on how to proceed with preventing shooting through walls (sticking your gun through a wall then firing).
Currently I'm considering giving the gun a hitbox and preventing it from firing if the hitbox hits a wall (edit: INSIDE a wall), however, I have no idea how to do this - I've experimented with touched and I don't know how to properly use it to do this. Any help is greatly appreciated! Thanks.