How to allow players to select a button by focusing on it for a certain amount of time?

Hello, I’m very new to Unreal although I’ve watched a ton of tutorials and have tried to learn as much as I can, but I still have not found an answer to my question.

I am making a simple VR educational experience that will likely be ported onto IOS/Android. With this being said, obviously, a large majority of mobile VR users don’t have controllers to use to interact with/select menu items.

I remember growing up when I had an Xbox Kinect, there was a game where I would select menu items by focusing my gaze on the button. A small circle outline would appear and if I stared at the button long enough for the circle to fill up, then the button would be pressed. If I looked away before the circle could fill up, then the button was not pressed.
Unless there is a simpler solution that I am just overlooking, I would like to implement something like this into my VR experience. The experience itself is mostly completed and I have done testing on my own machine and Oculus Quest 2 headset and clicking my PC mouse to select in-game buttons works, which seems great at first, but this is not great when you realize that the experience is intended to be played by players without controllers and only on mobile devices.

How would I go about implementing something like this, or are there any recommendations for any alternative methods?

In this experience, the user goes to the main title menu and has the option to select ‘Start Experience’ or another button that presents them with the option to change the language subtitles. Throughout the experience, users have educational audio describing what is happening in the animation around them. After that specific bit of information ends, they are presented with 2 next-destination options via 2 in-game buttons and are obviously taken to the destination that corresponds with the button they choose. As far as not allowing the user to click a button to move on to the next scene, I have not yet found a solution, but I am sure this is much easier to find information on compared to the main button interactivity predicament I seem to be in.

Thank you so much for any help you can provide!

Hey @PhantomStack! Welcome to the community!

So what you’re looking for here is called a Timer. I don’t know that much about VR, but I know:

with a MOUSE you can use an “OnBeginCursorOver Event”, then off of that start a timer. If timer completes, execute code. You may be able to do this with a “mouse is center of screen” type thing.

You would then have an “OnEndCursorOver” event, that would go into the “Reset Timer” on the Timer Node. That way it will stop and reset the timer :slight_smile:
All of this would go wherever the button code is, I assume on a widget! That’d be unique to your project as there are multiple ways to go about it.

Hope that helps! :slight_smile: