Description

In Game Input, the buttons for different thumbstick and trigger digital events (i.e. RightStickUp, LeftStickUp, LeftStickRight, etc) can actually fire multiple times in a single frame, even though we only actually evaluate the analog value once (for the last game input reading, in PostProcessInput).

 

This is because in FGameInputGamepadDeviceProcessor::ProcessGamepadButtonState, we are processing the analog buttons. What we should do is only process these button events when we actually fire the analog input events (in PostProcessInput during ProcessGamepadAnalogState). This will ensure that the gamepad buttons are fired only when you would also be able to query the actual analog input value of that thumbstick/trigger.

Steps to Reproduce
  1. Enable Game Input for windows plugin, disable XInput plugin
  2. Set the FPS to be lower (sub 30 fps) in the editor
  3. In a C++ widget, override UUserWidget::OnKeyDown and log out the input events and the current frame number
  4. Move the thumbstick/triggers around

Result: The thumbstick events can be fired multiple times on a single frame. 

Expected: They are only fired once per-frame. 

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay - Input
Affects Versions5.45.65.5
Target Fix5.6
Fix Commit38635854
CreatedDec 4, 2024
ResolvedDec 6, 2024
UpdatedDec 15, 2024
View Jira Issue