Clicking UMG Widget stops movement

My game uses MMO-like controls (WASD for movement with UMG widgets for stuff like unit frames, action bar etc). These widgets should obviously be clickable (for example to target units or to use spells in the action bar) while running the game (so pausing or setting input mode to UI only are not an option).

Now my problem: Whenever I am running (e.g. holding W) and click on a UMG widget at the same time, the character stops moving. I then have to release the W-key and press it again. I analyzed the issue so far, that clicking the UMG widget causes input axis to be reset to 0. Input Axis is processed on the Character.

Does anyone have a similar problem or know a workaround/fix? The even more annoying thing, is that the way my code is setup, releasing W causes the axis value to change to -1, causing the Character to move backwards indefinitely, but this is only a side-effect of the actual problem, as the Character should simply continue running when I click a widget.

Thanks in advance,
Elewyth

I found a workaround, but it still seems kinda weird:
Returning FReply::Unhandled instead of FReply::Handled in the NativeMouseButtonDown event prevents the key-release events from triggering. Well, it works for now, so…

Hey there, I encountered recently similar problem. Did u come up with something else or did you leave it like u posted? :slight_smile:

  • May I ask about in which function did u make those changes?
    Now I am searching the exact line in code where it loses it. The widget gets all of the control through function static void SetInputMode_GameAndUI(APlayerController* Target, UWidget* InWidgetToFocus = nullptr, bool bLockMouseToViewport = false, bool bHideCursorDuringCapture = true); The funny part is that if I press to move while in widget and then click mouse hero doesn’t lose input. So I assume that the previous input remains until new come and if widget can’t use it then it try level lower because if I click to move in some direction then he moves and after click at widget hero doesn’t stop.