i got a weird behaviour again:
Iam trying to spawn and posses the camera for every player on PostLogin. Spawning and possesing works perfectly fine for host and client but i want to pass the camera (trough the playerstate) to the playercontroller so the player can access and move it in the game.
However for some reason the camera is not valid after passing it to the player state but only for clients?!? The host can pass the camera without problems.
Yes the Camera should not be “not valid” but somehow it always prints “STATE: CAM NOT VALID”. Looks like the host executes it correctly (no print out, cameramovement works). But how can only the host execute it correctly and not the clients? SetCamRef gets called on the server and calls CamRef wich executes on the owning client. Why is Camera not valid even tho it is, right before the call of CamRef?
I tried to call the event directly in the gamestate. I create a new custom camera pawn for every new player and try to forward it to the player controller, so the player can move it. The given camera is always not valid for clients. I also tried to pass by reference without an effect.
I spawned the camera on the server and tried to print the cameras name on the client. This didnt work because the print was called on owning client and was not replicated. Now it is replicated and works just fine!