We are having a problem on my project with Enhanced Input. Whilst in UI Input Mode when holding a 1d axis key down and switching to Game Input Mode (via APlayerController::SetInputMode) the mapped Input action does not get triggered.
This means that when leaving the pause menu, if player tries to move before we leave UI Input Mode and enter game mode, the move Input action is not triggered requiring them to release and repress to start moving again.
We have tried using FModifyContextOptions::bIgnoreAllPressedKeysUntilRelease && UEnhancedInputDeveloperSettings::bSendTriggeredEventsWhenInputIsFlushed but this doesn’t seem to work because the UI Mode seems to prevent input from being processed normally.
Is there any way we can avoid this behaviour and what is the recommended way of managing Input Modes with enhanced input + common UI.
well this is generally common, i generally use input switches game and ui and slowdown+pause game behind without flushing input, go back to game checking its previous states or more likely continue action since state is true.
I am not sure of your setup but a common thing I used especially with range attack (shoot) retrigger is to
FInputActionValue Value = InputComponent->GetBoundActionValue(MyInputAction);
if (Value.Get<bool>())
{
// since player actuating do something
}
Generally if you save state like WeaponState:IsShooting, on context change you can check the key status and continue action as expected.
Its a bit annoying to have this but if you just do for movement and core actions, gameplay / ux wise it should be fine.
also in addition , think it is a thing.
If using GAS and listening input action there , it doesn’t really care the input action since I think its binded somewhere more lower level. It was working nice with weapons again without IA Trigger