Start and stop line tracing

I have a function that Event Tick in my actor a line trace will start from my motion controller. How can I turn off and on the line trace… basically I am tracing for objects in a room, when the line trace hits a object a umg menu pops up that allows me to change materials…I have all that working but a few issues are happening. Both my widget menus have hit enabled when the only one enabled should be the object that I hit at the time. Another issue is the line tracing, so I line trace one object and move the controller around it then line traces the 2nd object…I need to be able to disable the 2nd line trace so it doesn’t bring up with 2nd widget… is there a way to Able and Disable a line trace and also is there a widget setting for when the widget is invisible , disable hit detection for another widget? right now I am trying to have it for when one widget is visible disable hit detection on the other widget but I am having no luck.

Booleans and Branches are your best friend for these kinds of things.

You can have one Boolean (true/false) for when a widget is open, and if it’s true, then don’t allow any other widgets to open until that Boolean is false.

You can do the same thing with the trace. You should AVOID using Event tick for anything, wherever possible. You shouldn’t be tracing from event tick. It sounds like you’re using VR, so you could have a trace fire on a button press instead of event tick.