Server losing controller upon client join?

Hello there. I’ve been working on this game project for two months now, and after setting up player and such, I’ve gotten around to doing multilayer. The game is meant to be mostly multilayer so this is all important. Currently, you set up a game and host it (via LAN), and other players within the LAN can easily find and join the game. It all works pretty well, except for one thing. As soon as a second player joins the game, the first client seems to lose its controller. The widget I used for a HUD loses all its casting info, and the player is no longer controllable, and when I test it in the editor, the player is not even reacting to gravity, just stuck in air.

I’ve tried this on both Listen and dedicated server and I’m getting the same result every time. I can have 7 players joined and working fine, but the host will always become useless upon the second player joining.

I am using the create and join sessions nodes. If anyone can point me in the right direction, that would be a huge help. This problem is preventing me from getting any more work done, and I just can’t seem to find an answer.

Discover any solution? I’m experiencing the same issue.

I’m also having this issue. I’m on 4.12 right now and it still happens even with a 3rd person sample project right out of the box. I try to launch it with 2 players and the server receives no input (has no controller).

I am also having this issue. I am running a dedicated server. The first player to connect to the server always loses their controller when a second player joins and has same symptoms as described above.

Further, if I close the hung client, their old character never disappears, it just stays there as an object/statue where collision casting no longer works.

It’s ok if more people join the server after, but the first to join always seems to get kicked/freeze. Anyway, I’m going to start really digging in to see if I can fix the issue, but I thought I’d look around first to see if anyone else has the issue.

I think the way I got around this was either:

  1. Using PlayerStart’s instead of directly placed characters.

or 2) The Auto-Possess setting in the Character. I set mine to ‘don’t auto-possess’ because the login/spawn process takes care of ownership assignment. You may have to override

void ACharacter::PossessedBy(AController * NewController)
{ }

for your Character to have a reference to it’s Controller, if that’s a thing you need.

2 Likes

That actually did it, thanks!!!