The way I would try to solve this would be to get the dot product between the player’s forward vector and the wall’s axis vector. That would give you the cosine of the angle between the vectors which you could use in a boolean branch compare with a varying cutoff point. To get the wall vector you could create a vector perpendicular to the surface normal, or you could try to get the wall actor’s Y axis or something (depending on how your mesh is oriented). The second approach would probably be more stable but it depends on the specific project details. You may find that you have to make several traces along the general direction and come up with some kind of average depending on how smooth the walls in question are.
Of course there are probably a dozen ways to solve this problem.