I have a small VR app, in which the widget opens (or unhides) when the user points at a collision box. I would like make it so the widget only opens if overlapping for 1 second, not immediately. This is what I have so far, but it still opens the widget regardless of whether the overlap occurs for 1 second - it just waits 1 second and then opens! Can someone tell me what I’m doing wrong, or show me a smarter way to make this happen? I know this is probably a really newb question… hope it makes sense.
The issue is that a timer will keep running until you cancle it.
Promote the output variable from SetTimerByEvent to a new variable. On end overlap, get that TimerHandle var, and use the function ClearAndInvalidateTimer. You don’t need the boolean if you do this.
Alternatively, try setting the boolean to false on ComponentEndOverlap, it should have a similar result, even though the timer is still running in the background.
Works beautifully, thank you!