Description

If the return value of a trigger goes from ETriggerState::Ongoing to ETtriggerState::None, without returning a ETriggerState::Triggered, then there should be a "cancelled" event that is fired when Enhanced Input evaluates the state of the trigger. 

However, for Input Actions' who are no longer mapped to anything, they just get totally removed from the Action Instance Data cache. Instead, we should "zero-out" the value of these mappings and process their triggers one last time before removal, so that their input triggers fire the "canceled" or "completed" events respectively. This would be more in line with what an end user expects to happen when their mappings are rebuilt. We should maybe even do this 

Steps to Reproduce
  1. Create two Input Action asset with timed triggers (IA_A and IA_B) where the threshold is something like 2 seconds
  2. Create two Input mapping context assets. (IMC_A, IMC_B)
  3. Add a mapping to the "g" key to IA_A in IMC_A
  4. Add a mapping to the "g" key to IA_B in IMC_B
  5. Add IMC_A to your player controller on begin play
  6. In a Blueprint, in response to Debug key "J", remove IMC_A and add IMC_B
  7. Add prints in response to all events from IA_A somewhere
  8. PIE
  9. Hold down "G" for 1 second, and while you are holding it down, press "J" to change the active IMC 

Result: "Started" and "Ongoing" prints will happen

Expected: "Started", "Ongoing" and a "Canceled" will print on the screen 

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay - Input
Affects Versions5.4
Target Fix5.5
Fix Commit33264481
CreatedApr 1, 2024
ResolvedApr 26, 2024
UpdatedApr 30, 2024