Sound acording to material

I have this sytem that plays sound acording to material:

But my floor is a single cube with multiple materials and 2 physics materials (wood, concrete), and this line trace only detects the first material in this case is the wood, if i use the concrete material in any other object its works fine, but if the object has more than 1 material it only detects the first one.

how can i make it to read all materials of an object without having to seperate the meshes?