Download

Trouble getting server character's Control Rotation for animation

Hi,

I am trying to properly replicate my “freelook” animation and I’m having trouble getting the server’s character’s animation to replicate properly to clients. Clients replicate fine to the server which I found odd (I was thinking the opposite would be more likely). I’ve narrowed down the issue to be that the client is not able to “Get Control Rotation” for the server’s character (it is just stuck as 0,0,0 when debugging) but I can’t figure out why that is the case. I have replicate movement checked for my character so I thought that should allow Get Control Rotation to be picked up. The Get Control Rotation node can be seen at the right of my BlueprintUE paste below:

https://blueprintue.com/blueprint/skyeph_t/

Edit: I was just thinking, might I have to just store a separate rotator variable on my character to track the rotation of my “freelook”? It just occurred to me that this might work.

Edit 2: Figured this out. I set up RPC and Multicasting nodes on my mouse input controls on my character to set a CameraRotation variable. I did the same on my Freelook button event with a FreelookRotation variable so I can save the rotation of the camera the moment the freelook button is pressed, to return to the it when freelook is released. I updated my animation BP linked above to use the CameraRotation variable instead of trying to read from the controller’s rotation.

Feel free to PM if you have questions about my solution.