How can I detect a cursor hover over a circular widget?

UMG can detect cursor hovers over a widget, but as far as I know it can only detect the hovers over a rectangular-shaped widget. I need the widget to detect the hover within a circular bound, is there a way to do that?

Thanks.

As of right now no there isn’t, aside from making multiple buttons and tying them to the same function.

What is it exactly you’re trying to do?

I have a widget with a circle image on the hud, like so:

There is a building mechanic in our game, and I would like to only let the player build in the area within the red boundary of the circle (the pinkish-purple area), while the blue areas should not allow the player to build. The problem is, the widget also includes the square dark blue area that encompasses the circle. I would like to extract the cursor hover detection out of that dark blue square area.

well you can mask the image in a material so that only the red circle appears, that wouldn’t fix you’re hovering problem of wanting to only be able to interact with the red circle. kind of a cheap fix is you can determine the exact center of the circle, get the mouse position in 2d space and check to see if it is within bounds of the circle i.e. if the circle is 250 pixels in radius you can get the exact center position in 2d space and save it in a variable, then run a function that will get the mouse position in 2d space subtract the centers Y(base) and X(height) positions from the cursors y and x positions, get the absolute values, square them, add them, then find the square root of that value(hypotenuse) then compare if it is less than or equal to 250, if it is continue with running the function

Yeah, I actually wanted to do it that way at first, but I have no idea how to get the size of the widget on the viewport. I know the initial dimensions of the widget, because I set them myself, but if the screen size readjusts there’s no straightforward way of getting the pixel dimensions of the widget dynamically. I am looking into how I can, possibly, calculate the pixel dimensions myself (I think it has something to do with the dpi, since the actual ‘desired size’ never changes).

You may just have to assume everything to be 1080p and then when the resolution is lower just find the ratio or the 1080p control to the new ratio and multiply all your mathematical mumbojumbo with it. It’s be pretty nice if it was straight forward, either that or break down your UMG menu into like 48x48 buttons each corresponding to set coordinates in the world so its as simple as select a button, then select what you want built there, assuming its a 3-D game