Determining "wall", "floor" and "ceiling" based on a slope angle and direction of normals?

Break hit result node returns the physical material so that works together with line traces too.

It might still be buggy (see here, and here) with landscapes though, would need to test.