How to get the widget position even after the viewport size changes

Hello to everyone!

I am detecting the mouse position by tick and when it is inside the parameters I set, it does something. But, if the viewport size changes (Like you change the resolution) this all becomes messed up as you can see from the pictures. How can i get the mouse position and check if its inside the area i want? I am also using 4 gamepads for the menu navigation.

I found my answer and a better way to do it, in this awesome post! :smiley:

Wow, now that’s an old post. I don’t remember any videos but I am gonna show you a really simple way to achieve this. My stupid noob brain was making everything too complicated back then.

You can just use a Button to mark the area and set the alpha to 0 so it is transparent after you see that things work the way you want them.

Then you scroll down to the ready custom events and you simply select the “On Hovered” and “On Unhovered”

You assign anything you want to be executed in the events like this:

And when you hover or unhover the mouse it will always work, no matter the DPI scale of the viewport scale as long as you have correct anchor points.

I don’t suppose you could be a tad more specific as to where to find that awesome post?