Guidelines on where to put Input Modifiers and Input Triggers

Are there any guidelines on when to put the Input Modifiers and Input Triggers on Input Mapping Context vs Input Action?

There was an expectation on our side that it did not matter if the Triggers were placed in the Input Mapping Context (IMC) or the Input Action.

However, when reading the source code and testing in game (Lyra), the Modifiers on the Input Action will only apply to the Triggers on the Input Action and not on the IMC.

We could not find any documentation on this behaviour and want to know if there any guidelines on where Input Modifiers and Triggers are placed.

Steps to Reproduce

  1. Add Input Modifier and Input Trigger on the same (non-bool) Input Action in the Input Mapping Context and Input Action (Scalar Modifier and Pressed Trigger).
  2. Put a breakpoint in the Input Trigger.
  3. Trigger the Input Action and read the value in the Trigger.

Example: Scalar - 0.5x. 1st Trigger on IMC - X went from 1.0 to 0.5. 2nd Trigger on Input Action - X went from 0.5 to 0.25.

Hey there!

This is a known issue in the engine and it should be addressed in 5.6. The bug had to do with the equals operator when we determined which Input Modifiers/Triggers to recreate versus which to persist when control mappings were rebuilt.

I would still mostly recommend adding your triggers and modifiers in the Input Mapping Context itself though, as often times you may want different ones for gamepad versus keyboard/mouse mappings.

Thanks,

Ben