I recently added some GUI menus to my game, and stumbled upon an issue that people seem to have a had for a long time, that when you use the blueprint node “Set input mode game only”, the game will only detect the initial capture, and each subsequent double click, no normal mouse clicks. People have done some hacky stuff to work around it, but they don’t work right for my game mode.
I found someone suggesting to make another function to manually override the input to capture mouse input:
Yet I still have to double click to capture the input. Any ideas?
Edit: For some reason it worked when I hardcoded the consume mouse input to false in c++, but not when i set it blueprint. (I realize I had it set to true in the picture above, but either way around made no difference) Anyway it works now!
I think I had a similar issue a while ago.
In my case I have to swith between a player mode that needs a cursor (Isometric View with cursor) and one that captures the cursor (3rd Person Character).
There are multiple input modes you can set. As far as I know you can’t interact with Widgets in FInputModeGameOnly.
I think what you need to go for is the FInputModeGameAndUI or if you wish to suppress input from action or axis mappings FInputModeUIOnly.
You can switch between input modes during gameplay. To do this, you could implement a function similar to this:
I’m not sure if you found a solution, but I just recently had the same issue and this worked for me.
Add “Set Viewport Mouse Capture Mode” after your “Set Input Mode Game Only” node and set it to “Capture Permanently Including Initial Mouse Down” from the dropdown