No announcement yet.

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

  • Filter
  • Time
  • Show
Clear All
new posts

    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,

    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

    Thank you anyway, maybe this can help someone!

    Kind regards,