Pawn Possession Over Network

Hello,
So, the situation is that I have pawns already placed in the world in editor.
I do not wish to spawn and auto-possess a pawn using the game mode when the player joins.

The problem is that the server correctly possesses a pawn, but the client does not.
It’s my understanding that possession should take place server side, but I cannot figure out how the server can access the client’s Player Controller in order to force a possession.

If I knew how to directly access the player controller of a specific player (say using an index value) from the server, then the desired result should be achievable, but I do not understand how to do this.

I’ve been trying both in C++ and BP to fix this, but I am having no luck.

The only alternative approach that I can take is to spawn the pawns along with the Player Controller in the ‘traditional’ means, but this is not desirable as a number of settings for the pawn would also have to be generated.

I can provide evidence of previous attempts, though I’m not sure how useful they will be.
It would be greatly appreciated if someone could point me in the right direction here.

Edit: So, I managed to get this working on client side only by using the “PostLogin Event” which returns the newest player controller added and thus forcing a possession.
This doesn’t work server side however unless using a dedicated server, which gives me the desired result.
I’m not certain that I want to take the dedicated server approach however.

Something like this should work. Although, I am having minor issues and it may be because you cannot call functions in the replicated event. But I’m not sure about that yet. So basically, just put all code directly in the replicated event.
You could ignore the branch and just have the event, “destroy and unpossess controllers pawn”, “spawn and possess pawn”. I think the names and the code is quite self explanatory. But feel free to ask questions.

Thanks for the response.

I managed to get something working using the “OnPostLogin” Event, as stated in my edit. It’s not exactly elegant, but if I run a dedicated server (using the tick box under the play sub menu, for those who don’t know) then I get the desired result. Below is my temporary BP for achieving this.

Only problem is that now this has broken my HUD and the “AddToViewport” method is no longer working.

It also needs considering whether a dedicated server is what I wish to run.