Hi,
I’m trying to make an interaction system where you press the left mouse bouton to start interacting with an object but an events only happens when you release it.
i want to get the mouse location from the center of the screen to trigger the contextual event BUT since I want to make a 4 way interaction wheel I need to get the value of the position and clamp it every 90 degrees so that the mouse can only go straight up, down, left or right.
The idea behind the interaction system is based on the one from life is strange. I have an interactable actor that displays a name within a certain range and when the actor gets highlighted, a ui shows up to display the possible actions.
this doesn’t do anything as I have the UI over the object follow my character’s camera.
i think that all i need is to get the position of the mouse clamped every 90 degrees according to the UI’s world position and location to fire off and event related to the last hovered component.
I’m struggling to make the mouse location to be the center of my ui when left clicking and i have no idea on how to implement the clamping(?) of the input
the is interactable variable is set after the mesh gets highlighted and the ui changes to the interaction wheel, if it’s not set the it doesnt do anything to avoid glitches
i tried to set it on the event tick of one of my widgets for the arrow direction and now is shows the mouse cursor without me asking it to and it still gets stuck in ui mode