When focus changes an IE_Released event occurs for the W key (your character stops moving) due to UGameViewportClient::LostFocus calling APlayerController::FlushPressedKeys. Because of the R key press windows stops sending repeat WM_KEYDOWN messages for W and won't send any further messages until it is released.
We probably shouldn't be calling FlushPressedKeys here, but instead handling window resizing (and whatever else was cause the original bug that led to it being added) better. Need to investigate.
Note: Workaround is to override your player controller's FlushPressKeys and only call Super::FlushPressedKeys() if you didn't just switch the focus, but this may have knock ons if one of the events responsible for the UGameViewportClient::LostFocus bug occurs on the same frame.
See UDN for sample + extra repro details/bug explanation: https://udn.unrealengine.com/s/question/0D54z0000775mqsCAA/handling-character-movement-while-interacting-with-ui-in-gameandui-mode
Or from scratch in ThirdPersonExampleMap:
Map R key to an input action which:
Creates and adds a widget (just a button, doesn't really matter).
Delays 2s
Call "Set User Focus" on the widget
PIE, press W to start moving forward, press R, continue holding W.
After 2 seconds your character stops moving forwards, and will not move forwards again until you release and repress W.
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
What properties of the progress bar can be used for drag and drop highlighting?
What property of the Slider is the image used when dragging?
How does TextureRenderTarget2D get TArray<uint8> type data?
Lighting Turns Black in Play Mode
What method is used to fill polygonal regions when drawing spline mesh at run time?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-125224 in the post.
0 |
Component | UE - Gameplay - Input |
---|---|
Affects Versions | 4.26, 4.27, 5.0 |
Target Fix | 5.1 |
Created | Sep 3, 2021 |
---|---|
Resolved | Jul 20, 2022 |
Updated | Aug 30, 2022 |