Enhanced input multiple control bindings with inherited triggers is bugged

When having multiple control bindings assigned to 1 input action,

the expected behavior is bugged when the input action already defines an input trigger itself.

Only one of the bindings behaves correct.

The example defines a custom blocking input trigger, I haven’t tested with other triggers.

Steps to Reproduce
In the Lyra sample project:

  • Create a new custom InputTrigger (inheriting from UInputTrigger)
  • Override the following functions:

```

virtual ETriggerType GetTriggerType_Implementation() const override { return ETriggerType::Blocker; }

virtual ETriggerState UpdateState_Implementation(const UEnhancedPlayerInput* PlayerInput, FInputActionValue ModifiedValue, float DeltaTime) override { return ETriggerState::Triggered; }

virtual bool IsBlocking(const ETriggerState State) const override { return State == ETriggerState::Triggered; }

```

  • in the default input mapping add the trigger to both control bindings of input action jump
  • remove the ‘Pressed’ Input trigger for the gamepad binding
  • add the ‘pressed’ trigger in the triggers for the input action (IA_Jump)
  • Observe that jump is only blocked for 1 input type (KBM or gamepad) depending on the order of control bindings in the IMC.

Hey Andreas,

Can you elaborate on what exactly you expect the behavior to be?

You also said:

> … depending on the order of control bindings in the IMC.

The input mappings are mapped to different FKey’s in the case of gamepad versus keyboard and mouse. The “ETriggerType::Blocker” type is really only used internally in Enhanced Input for handling some specific chorded actions, so what exactly it should do in custom trigger implementations is not very well defined.

Thanks

Hi Ben,

Thanks for your answer.

I’ll elaborate below:

  • We use the blocker type for some other custom triggers that we’ve set up (in my example it’s just a very basic implementation to illustrate the issue).
  • Because the blocker is both on the control binding for KBM and Controller, and they share the same inheriting trigger from the input action (Pressed), I would expect the behavior for KBM and Controller to be the same. Now the behavior is different (blocked/not blocked) depending on the order in the IMC.

Hope this clarifies things,

Andreas

Hey there,

The root cause of this issue sounds like it may be coming from the fact that your triggers are defined on both the IA and the IMC.

I saw an earlier support issue about this, Unreal Engine Issues and Bug Tracker (UE\-270589), and a user has actually proposed a fix for it here: https://github.com/EpicGames/UnrealEngine/pull/13144/files

Can you check and see if that resolves your issue? If not, I can make another bug and look into it more deeply.

Thanks,

Ben

Hi Ben,

If defining triggers both on the IA and the IMC is considered bad practice, I was not aware of it and we’ll prevent that in the future.

Regarding the related issue: it seems it’s more related towards having different IMCs.

As we’re not on a source build (just yet) I’m not able to test the fix right now.

Once tested, I’ll update this thread.

Thanks for the response!

Andreas