LineTrace a masked material

Hello everybody.

I made a material that have a mask like this.

So, the black part is transparent or invisible and the white part is visible. The thing is that I need to know when my character is on the visible part, the white part. I tried to use a LineTraceByChannel but it detects the invisible part.

Is there any way to make that the Line Trace only detects the white part and not the black part? Is there another method to achieve my goal?

Thanks for your time