First person player continues sliding to the left/right after collision and adding the widget to the viewport

I made a widget blueprint and an object blueprint with the box collision in the first person template. When the player approaches the object the widget is added to the viewport. The widget is set to the UI Only Mode. As i understand in this mode no any player movement is allowed and i can operate only in the widget. But when the player collides with the object and the widget is brought to the screen it continues sliding to the either side till the next obstacle. I tried to use the Stop Movement function but it didn’t help. How can I fix this?

The input mode enables/disables input, not movement itself. So what happens in my opinion is that you press a movement key, the input axis goes from 0 to 1, but when the widget pops up the character movement stops getting input, so it doesn’t register the key relesed event; for the character the key is still pressed, and Stop Movement won’t help because the input axis value pertains.

You have to change axis inputs to 0 before showing the widget.

It is good assumption. I tried to set inputs to 0, the player still slides. What else makes the character continue moving?

I just checked it in my project, and the axis value is indeed kept at 1 after Input is set to UI Only. What I did a long time ago is added a branch to player movement to avoid all those stuff, like this:

So whenever you switch input to UI, you can set the variable to false. If it works in your case, you’ll know for sure that the issue is in the input axis.

This variable is declared in the FirstPerson blueprint, is it correct? When i try to set it to false in my object blueprint I get error “Accessed None trying to read property”.

I found the solution. I set Set Ignore Move Input to true and the player freezes without any sliding, i set it again to false when i exit from the widget. Thank you for your help.