Onhovered on Unhovered button widget - open level or stay on level

Hello everybody! I’m doing a 360 tour in unreal with 360 images rendered in 3dsmax. I created the 360 environment on each level and created a widget with a hotspot logo button to transition to the next level.
I did everything right, I put a delay of 4 seconds before opening the level.
What I want to know is how do I make it not open the level if I take the mouse off the button.
Because if I hover the mouse over it, even if I take the mouse out right away, it opens the new level.
I’m not able to know how to make him cancel the open level when taking the mouse off the widget button.



Hey , welcome to the Unreal Engine community!

You are on the right track here with the Branch node, we can use a built in function called IsHovered to check if the button is being hovered, and then use that information to decide what to do in the branch. You’ll also want to change your Delay node to a Retriggerable Delay. This will make your delay reset if the button stops being hovered and starts being hovered again. If you don’t switch to a retriggerable delay someone could hover for two seconds, unhover 1.8 seconds, then hover again and the branch will return true and change the level.

You’ll need to make sure you get a reference to the button and use that as the target for Is Hovered. This will ensure that your button needs to be hovered for the full 4 seconds before checking if it should open the level or not. If you stop hovering during those 4 seconds the branch will return false; if you stop and start hovering within 4 seconds the delay will restart.

I hope this information helps, and again, welcome to the community!

1 Like

Hello SkyCarCaesar!
Thank you very much for the quick readiness to help.
It was exactly what I needed.
I’m starting to learn this blueprint part, before I did just the visual part.
It’s great to be able to count on a community to help us when we need it.
I was very happy!