In unreal right now they only replicate pitch for client in Pawn, and you can only get that through C++ only. They replicate by taking value from Controller rotation from server, because only server and owner client have controller, which indicate where you look.
So here you need to get controller rotation, then get pitch and yaw from there and save to some replicate value for client to see.
I have saved pitch and yaw in a variable like you said.
But how I can now use this Variables in AnimBP?
I have tried to send a InterfaceMessage with Pitch and Yaw. (didn’t work)
And I Have tried to make this Variable public, but I dont know which Target I have to set.
This works in C++ without doing any extra replication. I only have the C++ code but I’m pretty sure everything is exposed in blueprint. This is used in the Shootergame C++ example for the first person aim offsets to replicate. Control rotation does not replicate but view direction is available for a pawn so you work backwards.
@dancode@spacebares I understand this solution will work for replicating the pitch. Will this work in a third person game for replicating the yaw if your character class has bUseControllerRotationYaw set to false?
I have a third person perspective game, with bUseControllerRotationYaw set to false, and I need to replicate the controller aim yaw value so that way it can rotate the head left and right, but have been unable to find a way without adding my own custom yaw replication code.
Does someone know of a solution for this? Should the above code work for this?