Hello everyone,
I’m facing a challenge in my Unreal Engine project related to a drag and drop operation for controlling cards in my game. While the drag and drop functionality works perfectly for managing the cards in my hand, I’m encountering issues when these cards need to interact with actors in my world. Specifically:
1. “On Mouse Enter” Events Not Triggering: When the drag and drop operation is active, the “On Mouse Enter” events for my actors do not trigger.
2. Incorrect Mouse Location: The mouse location on the screen does not update correctly during the drag and drop operation.
These two are likely connected as Interestingly, when I use my enhanced input mapping action to scroll-in (even if the rest of the function is disconnected), the mouse position updates correctly once for, and an “On Mouse Enter” event is triggered at the mouse’s location when the scroll-in event occurs. The location the mouse location was updated to when I would scroll is then kept and if I would rotate the camera and have that locations pan over other actors their “on Mouse Enter” event would trigger.
What I’ve Tried:
• Setting Mouse Positions to the Pointer Event: I attempted to set the mouse positions to the pointer event from the drag and drop operation, but this resulted in very erratic and hard-to-control mouse movements.
Some Video demonstrations:
When not dragging a card the mouse over event fires and the tiles raise a little when the mouse is over them and lowers when it leaves:
When the card is dragged the mouse over events are not fired:
But if I scroll in it correctly updates the mouse location to my actual mouse location (In the video i have the input action connected to a timeline that reduces the length of the spring arm on the camera. This works if there is nothing connected to the scroll event):
If I scroll in once to update the mouse location and then rotate the camera around the mouse location that was updated remains in place and it triggers mouse over events as if the mouse is still in that locaiton:
What I’m Looking For:
• A method to constantly update the mouse position to the correct location while the drag and drop operation is active without impacting controlling the mouse.
• Alternatively, a way to have the drag and drop operation not consume the input events, allowing the “On Mouse Enter” events to trigger as expected.
Has anyone encountered similar issues or have any suggestions on how to resolve this? Any help would be greatly appreciated!
Thank you in advance for your assistance.