The problem with line trace is that it may very well miss enemies that aren’t STRAIGHT ahead.
I would do what @BIGTIMEMASTER suggests, and iterate all enemy pawns.
Quickly reject those that are further than X total distance away, and those that are “behind” in the dot product with the forward vector.
Now, score each of the remaining enemies by proximity, and draw an arrow towards the closest one. Scoring might include visibility queries, penalties for off-axis location, and so forth.
To reduce number of visibility queries, start with the closest scoring actor, and calculate its visibility, if it’s visible, pick that one, so you don’t have to test others; repeat if not.