how to make world space widget not visible through walls?

I have a widget that is attached to an actor within my scene. It indicates where the actor is when you get close enough to the object. I want to know if there is a way to make the widget not be visible through all geometry.

So the widget becomes visible when player comes withing a certain distance of the object using sphere collision overlap. The widget renders on top of everything, instead of being occluded by any geometry.

I’m tempted to suggest keeping the widget hidden until you have line of sight, but if its purpose is to help the player find the object, I get a bit confused…a screenshot of the problem scenario along with maybe like a mockup of the correct functionality might help. Probably just me not understanding anyhow…

With my visibility suggestion, I would say to use something like a line trace to reference the player having line of sight, thus enabling visibility.

Make a trigger box that will remove the widget and parse it close the the walls