Host client can't move after seamless servertravel (Multiplayer)

Hello guys,

so I got this problem where the host client is not able to move after performing a seamless server travel when there is at least one other client connected…

As long as there is no other player connected, the host client can move around just fine…

My setup:
You can host a game via a open level node to create a listen server. Than, up to 3 additional players can connect to that lobby (up to that point everything works fine). The problem starts as soon as the host client hits the “start game” button which tells the lobby game mode to perform a seamless servertravel to the desired map.

The new Map overrides the lobbies’ gamemode with an ingame gamemode which contains other custom Gamestate/Playercontroller/etc. classes.

The strange thing is, all characters including the host clients pawn are spawned (I only got a PlayerStart object to spawn the characters) and execute all their code, but only the clients are able to move around while the host is rooted in place unable to move or rotate the camera (maybe it helps to say that all input actions are coded in the player character class). And to stress this out again, as long as I perform the servertravel without additional connected clients, the host client has no problem moving around.

I would really appreciate if you could help me with this problem as I am pretty desperate right now…

Thank you very much in advance and kind regards,
Rick

Okay so I found out the problem myself…

The host won’t switch his player controller to that of the new game mode until all clients have connected. Since I have a couple of functions in begin play, those trigger on the “old” player controller (one of them is the “input mode: game only” node). Then, when the host client changes its player controller, the “new” one won’t get the input anymore since it has already been handled by the old one (for example, the “input mode: game only” node has already been executed on the lobby player controller).

I fixxed the problem by putting all those functions in the new player controllers begin play :slight_smile:

Thank you anyway, maybe this can help someone!

Kind regards,
Rick

Thank you so much for coming back and posting your solution, it would have taken me a ton of time and more print statements than I care to think about to figure this out!

It seems like I’m having the same issue, except I cannot solve it the way you did.
Would you mind explaining how you did it? I’m having trouble understanding why and how I should change the PlayerController. (which is at this time, totally empty)

What do you mean with “putting the functions in the begin play” ?

All the functions that are in my Pawn class are for movement, and I don’t see why I should port them over to the Controller.
Should I do everything in there, or should both work hand-in-hand together?
EX:

  • set the camera up in the Pawn, and limit its angle in the Controller
    OR
  • do both setup and limiting in the Controller?

Thank you in advance,

EDIT: I fixed my problem by disabling pawn auto-possession. (it was previously set to Player0)

how did you disable pawn auto possess?