Download

Replicated variable doesn't replicate on animblueprint

Hey, so this has had me scratching my head for hours now.

What I’m attempting to is this:

Get the desired rotation of the player controller, and store it in a (replicating) variable which is used in the Anim Graph.

If we are server, we get the desired rotation RPCd to us from each clients player controller. (This works. The server sees the pitch value update on all other player characters)

If we are a client, get our own desired rotation and set our characters animblueprint pitch from that. For other characters, do nothing and let the server send you their pitch values. (This works for the owned character, but for other characters the pitch value remains at 0. If I set the other characters value to update to the value or Get Time or some random value, the characters do pitch, but obviously not to the proper angle which would be sent by the desired rot. So this leads me to believe that the pitch value isn’t replicated properly from server to clients)

What could be the problem? I’m out of ideas.

2b9a0a8eef41d87cb5eb8f651ea59c3dc78f6046.jpeg

Update: I solved this by setting another pitch variable in the character blueprint whenever the mouse is moved, then RPC it to the server, which then replicates it to everyone else, so that everyone has the value, and then I transfer the values to the variable in the animblueprint. I still don’t understand why the variable couldn’t be replicated in the animblueprint, and this method calls for some extra bandwidth to send the pitch value to the server and back out every frame, but atleast it works now.