Character movement force stop after i closed Inventory

So i made this inventory with close button, while im moving(W A S D) and i click on my close button my character will stop moving according to the key im pressing(if i was moving with W then my character will stop moving forward but other keys work fine)

Seems odd that only one button would stop working. but I have had occasional issues with inputs after opening/closing widgets as well. Sometimes it is how the user input is received. There is a node “set input mode” with 3 different options as i recall, (Game only, Game and UI, UI only). Again not sure why only one button is not capturing but try calling the “set input mode Game or Game and UI” after you close your inventory and see if that fixes it.

tried them all but still the same andi see the root of the problem now, whenever i click on the widget the forward and right vector will reset to 0 , do u know why?

Do you have screen shots of the widget blueprint, how the menu opens and closes and your movement inputs?

hello and thanks for responding again Nebula Games Inc, here are the screenshot

Add a second print string to the “input axis move right” and tell me what happens to the print when a movement input isn’t “moving” the character, when you have this weird issue. Does that stool print and the character doesn’t move or does it stop printing altogether?

oh again i just found out only the W key is weird more specific that weird behavior only affects MoveForward with the Scale value of 1

lol this is too weird, if im holding one key (A or S or D) , the first time when i click on the closebutton is ok but the second time will stop my movement

so i found the answer myself, it was answered by [EPIC] Nick Darnell :diamonds::diamonds: in other post “This is by design, focusable widgets have an option, is Focusable. Widgets like button who take focus force all keys to be released. For example, this is so if you click on textbox, you’re no longer sending character input to the game. Buttons default to focusable so that they work with a controller. Clicking them with the mouse will give them focus though, so just change the buttons to not be focusable and they’ll stop forcing the release of the buttons.”

3 Likes

Cool! Didn’t know that…thanks for sharing.

1 Like

You’re awesome thank you!

1 Like