Description

When playing in editor is running at a lower fps (<20) there is very noticeable input delay that wasn't present in 4.27.2. Works correctly while playing in Stand Alone or Packaged.

Tracked this issue down to FWindowsRealTimeStylusPlugin::QueryInterface in the StylusInput plugin. Disabling the "Stylus & Tablet Plugin" fixes the input delay and serves as a workaround if needed.

To quote an engine user:  

This occurs for our product in PIE, with input being delayed and then slowly played back up to 3-4 seconds late. It compounds over time by providing consistent input (move forward with the W key, move camera with mouse). Once input is played back, the delay is gone until consistent input is provided again. I am getting ~15 FPS.

Debugging the input stack, it looks like UE is not receiving the input on time. FWindowsPlatformApplicationMisc::PumpMessages does not return the new messages on time. I confirmed this with Spy++, and see input messages being retrieved from the windows input queue delayed. That message retrieval timing matches when I see the movement actually applied to my character, so I do not think there is significant delay within Unreal itself.

Best I can tell, PumpMessages is being called from the main thread and should pull all messages from the queue in a loop. I've been unable to track down how that input processing is behind while frames are still processing.

Would love to hear any suggestions of workarounds, as this is fairly impactful for testing. Thanks!

Steps to Reproduce
  1. Create a new Third Person Project
  2. Play in Editor
  3. Press ` key then enter the command t.maxfps 10
  4. Run in a circle while turning the camera for a few seconds
  5. Stop moving then observe

Expected Results:

The character and camera stop immediately.

Actual Results:
The character and camera continue to move for a brief time.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-144238 in the post.

19
Login to Vote

Backlogged
ComponentUE - Editor - UI Systems
Affects Versions5.0
CreatedMar 1, 2022
UpdatedDec 15, 2023