Search code examples
unreal-engine4unreal-blueprintsession-replication

How do I access my Player Camera Manager (replicated (listen server and client)) in UE4 Blueprints


When I try to access the location of my Player Camera Manager on the server it returns 0, 0, 0.

I think that I tried every option on setting the Player Camera Manager respectively the Player Controller in all the replicated options. To be clear: At first, I used my common sense but after a week of failure I tried every combination with no success.

As an example: Here is how I tried to access the Location and the forward Vector for a Line Trace As an example: Here is how I tried to access the Location and the forward Vector for a Line Trace

I also tried to set the Camera Manager as a variable (I tried both server and client) and then access it on the server.

Does anyone have any ideas on how to fix that?

Any help is much appreciated.


Solution

  • APlayerCameraManager is not an actor that replicates, so I'd expect that blueprints to only work on the client. You'll have to replicate the values you need back to the server.

    If you're making a first person game APawn replicates a variable named RemoteViewPitch that may be enough depending on what you're doing.