For Singleplayer I use Pause / Unpause game and for Multiplayer I make a check whether the player is moving or not and if he does he can’t access the pause menu.
I don’t know if there is a specific function for resetting the Axis value manually but my workaround works fine for me
Edit: or you can set a bool to true when in UI only mode and while it’s true set the speed to 0. This was my first attempt for the Multiplayer issue but it’s no the best situation when for example an enemy player suddenly stops from high speeds for example.
Thank you for your reply! My game is single player but I can’t use pause because I want the game to keep running when the menu is open. Only letting the player pause when not moving would work I guess but that sounds quite annoying for the player since there is no real reason for having to do that. I hope I can find a workaround with less harsh side effects
Also for your second idea my player can do a lot more stuff than just moving so disabling all this manual would be a pain.
edit: I tried disabling the controller input 1 or 2 frames before opening the menu but even this did not fix the bug
Since the RELEASE event is ignored, the key state (axis value) remains the same. That is probably why after changing to SetInputModeGameOnly() the character keeps moving in the same direction until you press the relevant key again (update the old axis value).
// ...other includes and code for other things...]
void UBPFL::flushInputs(const APlayerController* PlayerController)
This gives me a node inside blueprint that I can place before or after the Input Mode.