(Blueprint / MP) Client Possession or Input not working

Hello Guys :slight_smile:

I am currently in the Process of learning basic Networking and got stuck.

I am able to create a Server from my Main Menu and Join it as well. (I am using the advanced sessions Plugin for all of that)

What i want to do now is spawn a Camera pawn for every player that is connecting so he can move around and look at the level.

I already learned that i have to handle all that stuff Serverside and just tell the Clients what is happening, but somewhere i went wrong or forgot something.

My Host instantly gets his Pawn spawned, possessed and can move around using his W A S D.
When the Client connects he gets his Pawn spawned and his view snaps to the Position (I guess that means the Possess does work?) BUT the client can not move. His Input does not reach the Pawn for some reason…i tried different things and i will post all of them below:

First off; In the Gamemode BP; Player Joins → Spawn and Possess Camera Pawn

In Playercontroller; Camera Movement (Version 1)

In Playercontroller; Camera Movement (Version 2, only did one half since it didnt work either)

Im stuck on that for quite a while trying to figure it out on my own, but as you can tell (since im here)…it didnt work ^^
Any Ideas?

No one? Damnit…either this is a really hard to solve Problem or i didnt explain it properly. Im still stuck on this.
Any further information needed? More Screenshots? Let me know!

P.S.: Sorry for double posting, but this is really grinding my gears rn…

Did you set the Camera Actor to be replicated and replicate movement? It’s in the details panel of the actor. I also enabled always relevant so distance between client and server doesn’t matter.

338144-replication.jpg

Yes. I didnt have always relevant checked though. Did try it just now…didnt do anything for me as well.

Like this?

Did not work either. But what you said makes total sense to me…cant refer to something thats not there…

The new player parameter of OnPostLogin should be saved into a local variable or passed through the SpawnCameraPawn custom event. Since it is a function local variable, the cast is failing due to the null pointer.

Yea i could do that…
but in the first place i am here to understand exactly why its not working rather than just solving it by working around :wink:

I want to understand how this stuff works so i can use it efficiently in the future. (starting to study gamedesign next year)

Thanks for the help anyways :slight_smile:

ok thats strange… you could use (reparent) your Camera Actor to a Character class. the character class has a build in replication system that works nice for basic stuff.

Anyone got another idea?

I tried redoing my server setup and join to be sure that its not caused by that. Didnt work.

I noticed that the Server itself does indeed register actions by the client. “Hover over” or “on click” events do trigger, but all the commands going through the player controller / the camera pawn dont do anything. Do i have to take something else into account when possessing? Is there something i dont see/ know?