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
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.
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.
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.
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?