Enhanced Input + Multiplayer = only Player 2 has Inputs?

Hi there…

I tried myself through the Enhanced Input System of 5.1 today… and got a strange Problem.

I created an Input Action that has a trigger for “Pressed”, and a Mapping Context with this IA, that fires on hitting the “i” Key.
The mapping Content is added in the Player Controller’s BeginPlay.
And I added the Input Action Event, that fires a print on Triggered.

When I now start Multiplayer in Standalone (cause servertravel…) with EOS as Subsystem, I can hit “i” on both Windows… but only the joined Player has Input actions and fires a print… The host Player is not reacting…

Did I miss something to enable the Enhanced Input System in Multiplayer?

1 Like

Hey, I have some suggestions and I think you will find the answer somewhere within here. It does however sound like you have set up the enhanced input system correctly, causing it to not work as expected in multiplayer. Try these to further troubleshoot the issue:

  • Make sure that the input action and its associated mapping context are being added to the player controller’s input component on both the client and server sides.

  • Check that the input action’s “bExecuteWhenPaused” property is set to true. This ensures that the input action will still be processed even when the game is paused.

  • In the Input Action Event, make sure that you are calling the function on the server side only by using the “Run on Server” node.

  • Make sure that the enhanced input system is enabled in your project settings. Go to Project Settings → Engine → Input and check that the “Use Enhanced Input System” option is checked.

  • Make sure that the Input Mapping Context is set to the correct value. In your case, you want to check that the Input Mapping Context is set to PlayerController.

  • Verify that your PlayerController Blueprint is set up correctly. Make sure that the Player Controller’s input component has the input action and mapping context added to it in the Blueprint’s BeginPlay event.

  • Make sure that the EOS subsystem is set up correctly. In your case, check that the EOS subsystem is correctly set as the default online subsystem in the project settings. (Should be on by default in 5.1)

It’s also possible that the problem is related to a bug or limitation of the enhanced input system in multiplayer. If none of these solutions solve the problem, you may want to consider using the legacy input system or seek help from the Unreal Engine community.

Please let me know if some of my suggestions were helpful!

2 Likes

Ok… I made sure every task you mentioned is set… except

Go to Project Settings → Engine → Input and check that the “Use Enhanced Input System” option is checked.

cause that options does not exist in 5.1, since EIS is active per default.

But, after some further testing, I found the reason for that strange behavior…

When I change levels via seamless travel and servertravel, the input of the host is ignored… while the joined client still has EIS active…

But… I need servertravel ^^"

Thanks for notifying me!

I am not really sure what the problem is in that case. Do you receive any error messages?

Ok… more testing… more curiosities…

The EIS works… and registers triggers…

But…
The HUD Widget for the first player (the host) is not created…

For further help… here is my Login process in the GM:

This is the Setup in the PC:

And this is the BeginPlay Stuff of the PC:

The Problem now is:
The UI_HUD Widget (a UserWidget) should be created, if the current Level is not the Lobby.
Therefor, the GM tests if the level name contains “000_Lobby”, the name of the Lobby Level.
So… the Client_BeginPlay has to create the Lobby, if it is inside the Lobby Level (that works!) and create the HUD, if not in the Lobby (only works for the joined client, not the host client…)

Means… the EIS Input is triggered… but nothing is shown, beside a print string in the Trigger event, that UI_HUD is not valid on the host client side…

2 Likes

Ok… got it working…


Missed the Authority check on the server, to spawn the HUD for the host client…

1 Like

So how did you solve the EIS, seamless travel, server travel issue? I’m having the same issue - using 5.2 C++
Thanks