Download

still no luck - viewport not grabbing focus on mouse hide/show

I was reading Answer hub and so forth, there is no real answer with this.
When starting game; menu screen it’s focused and buttons OK with mouse over etc, then when loading the level the focus is lost and I have to click in the viewport to get focus, then when hitting ESC key back to menu focus is lost again and have to click again in viewport to grab focus. This is getting so annoying. Then I found out by doing a stupid thing setting in a Begin Play node (of cause this is loading the level and straightaway back to menu screen but it’s keeping focus). Is this a bug? I really need some help fixing this. In my previous post about that issue, user recommendations didn’t have any effect to solve the problem. From what I think is, perhaps this has something to do with the Begin Play node because from there it works, but as mentioned this triggers the level to go back to the menu screen. I’m fully lost here.

I had/have the same issue when using UMG Widget and enabled mouse input when a widget comes up, when closing the widget the mouse becomes inactive in game and have to click inside the game first before mouse input inside the game starts working again.

Are you using by any chance 3rd Person view ?

Yes I use Third Person.

Did you use SetFocusToGameViewport after 1 second delay when map loads and user’s beginplay completed? Sorry I can’t visualize.

I have notice that if you use First Person this issue don’t occur,

I Did find a solution for it (keep in mind that this is just a example)

6U0EKbB.png

Thanks to Garner for Pointing that out.

I do think if your doing something with a widget to SetFocusToGameViewport it’s better to call it on closing a widget, some where in a function. wich depends on your setup.

will try later a FPS setup - below screens from the BP settings but didn’t work with delay
I find it rather weird that this is such a big deal to get it right something what we take for granted in every game

I tried FPS setup, still the same

I have notice that if you don’t click on your hud or do any mouse click actions it works fine, if you do then you need to click your mouse before game becomes active again. i think this is a bug, many somebody of the unreal developers can confirm a issue or fix about this.