I was just wondering if there’s an easy way to detect widget overlap/collision with another widget element. I’m making a local multiplayer game with 4 players/controllers and I have a front-end menu something like this:
So there are 4 “cursor” widgets (1 for each controller) and different boxes that if they press A while hovering over select a character. Right now I’m basically creating a function wherein I input the coordinates of a “box” myself and then checking the coordinates of the cursor widget for the controller that pressed A and comparing them. This works, but has the major problem that if I edit the menu layout (add a character, change the look, etc.) then I have to manually input the new box coordinates to check the cursor’s position against.
Here’s an example of the check for the “Billy” character’s box which is in each player cursor widget:
It seems like there must be a simpler way to do this, using some sort of collision or overlap check event, but I haven’t been able to find anything for widget elements.