HUD blueprint mouse event problem. Is it a bug, or working well??

Hey Everyone!
I wanted to do the following: I need a button, which on pressed, spawns an actor on the mouse’s world coordinates position, then the actor follows the mouse on move, and on release, the actor stay on the release cursor’s world coordinations.
I made like this: I made a HUD blueprint with a button. In HUD graph I used the button’s On Pressed and On Released event which manages the actor spawn, and set a bool variable if the actor is spawned or not. Then in the Event Tick I managed to get the mouse world position, and set the actor to this position, is the burron is clicked.

My problem is the following: When I run the blueprint, and click on button, then move my cursor, and release it, everithing working as I expected. But, if I click on the world (not on the button), then click on the button again, and move my cursor, the cursor world location doesnt change, it keeps staying in the button’s boundaries coordinations.

Hi and welcome! I think this is a common issue with clicking in game only input mode. Try setting input mode to game and UI.

1 Like

Thank you sir, the “Set Input Mode Game And UI” in the level HUD made it to work!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.