Mouse not being hidden with Set Show Mouse Cursor or Set Cursor (widget)

I’m trying to make the mouse cursor disappear after a set time if not moving in my widget, like in a video player.

I tried using the usual Set Show Mouse Cursor and it didn’t seem to work for some reason. After some searching it seems UMG sometimes conflicts with the controller or something and swapping to Set Cursor in the widget helped somewhat. I also had some problems since the game is paused in-widget and had to work around not having timers and used delays instead.

The issue I have now is that, despite the show/hide logic working as I’m getting the right strings on screen, the cursor doesn’t disappear unless I click. Another thing I noticed is that when holding the mouse down (either right and left click) the cursor appears, but disappears unless I move it. Moving it unhides it, but it refuses to hide back despite executing the set cursor. I also chained a Set Show Mouse Cursor with the Set Cursor but that didn’t work either. I even collapsed the Set Cursor into a function with all my widgets thinking one of them overrode the parent itself.

It seems to be a bug

If I make the ‘initial click’ on the Viewport - after 2s the mouse should go invisible but it doesn’t until I move it for 1 pixel

If I don’t make the 1st click - it works fine

“Set Input Mode” to whatever doesn’t change anything

So basically it won’t disappear until you move the mouse after the ‘Show Mouse Cursor’ was disabled - I consider this being a bug, you may want to issue that to Epic Games using their reporting system

Hey there @Derelict_Assets! I heard you may have found a bug, I’m taking a look into the issue tracker and couldn’t find a recent one with this specific case. I’ve seen a couple for significantly older versions for the same issue, most issues fixed by 4.16/4.26. Could have resurfaced however.

Here’s the process for reporting the bug outright if it persists!

Had some time and recorded the problem for extra clarity. In spite of my blueprint above, the mouse will only disappear if I click once. The print strings show when I’m moving, when it’s visible and when it should start to be hidden.

I’ll look around some more today, but I’ll report it as a bug if i don’t find anything.

1 Like