Ray-casting a ray, then checking width to see if it can be penetrated.

I have looked, and haven’t been able to find an answer.
I got it to work, but only with actors when I use BSP it falls apart and doesn’t always work.