Download

Viewport not possessing player when more than 1 player should spawn

Hello everybody.

I’m taking my first steps in UE4 multiplayer programming. To do so, I bought Tom Looman’s excelent course in udemy to help me get there a little bit faster.
Unfortunately, I’m stumped in what to me should be one of the more straighforward steps, which is to actually spawn two controlable pawns in game.

As per the title, whenever I try to spawn two or more players, the viewport simply doesn’t control one of them, and instead stays locked in the same position. I can press F8 to move around and thus see the pawn is correctly spawned, but I can’t control it. What is more strange, is that I can sort of dance around this issue by spawning 3 players, in which case I get two additional windows that can in fact be controlled, but the viewport stays the same.

Engine version is 4.24.3.

In addition, in my output I get the following messages :


LogNet: Join succeeded: DESKTOP-RNJCVBL-5739
LogNet: Client netspeed is 10000
LogNet: Join request: /Game/FirstPersonCPP/Maps/FirstPersonExampleMap?PktLagMin=0?PktLagMax=0?PktLoss=0?PktIncomingLagMin=0?PktIncomingLagMax=0?PktIncomingLoss=0?Name=DESKTOP-RNJCVBL-DE69EB694233F52E98290DB15CCF335E?SplitscreenCount=1
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
LogNet: Join succeeded: DESKTOP-RNJCVBL-DE69

I don’t know if this helps in some way, but I feel it probably does.

Thanks in advance

Okay, so after largely ignoring the problem for a long time and working on other features of my game I finally got around to fixing this, and I’m posting the solution to my problem here for posterity in order to help anyone else.
The issue was that my character BP, which I generated from my C++ class, had the auto possess setting to Player 0 on the Class Defaults tab. So whenever trying to spawn a character through a player start actor some sort of conflict arose because, I assume, every character spawned tried to possess Player 0 but none of them could do it, which rendered the viewport, which normally acts as Player 0’s window, unusable and unresponsive.

Hope this helps someone else in the future !