Enhanced Input: RebuildControlMappings loses information about the last state of a trigger

Probably related Unreal Engine Issues and Bug Tracker (UE-169980)

[Attachment Removed]

Steps to Reproduce

  • Open the ThirdPerson unreal project (or any)
  • Add two input actions (A and B) mapped to the same key. “U”, for example. To IMC_Default
  • Input action A will have a trigger of type “Pressed” in the IMC, not the Action (this is not an issue if the trigger is in the Action directly)
  • Bind Input action A to a debug print
  • Bind Input action B to GetEnhancedInput -> RebuildingControlMappings
  • See how when you press “A” you debug print constantly when it should only debug print once
  • Move the trigger to the input action directly and remove it from IMC_Default. See it working correctly despite rebuilding the mappings.

The reason for this is that when we rebuild the mappings the LastValue of the pressed trigger is lost. This is not an issue if the trigger lives in the action directly as this one is persistent.

Note that this example makes little sense, but this could happen if we add or remove an unrelated IMC as that would trigger a rebuild too.

[Attachment Removed]

Hi there,

Thank you for the detailed repro steps. I can confirm that i can reproduce this in 5.7.3. I have created a bug report which you can track here once it is available publicly.

Cheers,

Louis

[Attachment Removed]