I have been having trouble trying to get the player characters look up/down to replicate properly. I am sure i am just doing it very wrong, but i just cant figure it out.
I have looked around for help on this and I have found a couple of possible answers but when trying to implement them to my project, i can never get it to work. One possible solution are from this post, but i have failed to succed.
Currently i am using the input of the default ‘character’ blueprint, but have just made some changes.
Maybe i need to describe this better or upload pictures but if anyone happens to know how i could fix this so that when a player looks up and down, it replicates and both clients and server can see it.
Better post some pic of your attempt in blueprint.
My suggestion would be that since animation bp ultimately decides what gets posed, when you use the debug feature when simulate, monitor your value in animation BP closely.
(in the update event you should have some getPawnOwner node that can let you copy replicated variable from character BP, so monitor there)
Note: you should only really replicate variables attached to your player character, NOT the variable in your animation BP.
Hello, thanks for the response, however I still could not figure it out.
I looked at the Anim blueprint of my character in debug mode while playing, and couldn’t find anything, it would just play through all the executions and I do not quite understand by ‘monitor’ the value in there sorry. I then made a ‘get actor rotation’ off my cast to character and then printed the actors rotation (shown in picture below). This showed me that it was only printing the YAW value, and there would be no change to the PITCH or ROLL. I believe I want the PITCH values to be changing when I look up/down, but I don’t know how I can achieve this.
I am using the standard blueprint first person template. I am wondering what is different in my Character blueprint for the ‘turn’ rotation to be replicated but not the ‘up/down’ rotation?
Here is my anim blueprint with the print string :
and here are the results, only getting ‘turn’ information.
Any further help is greatly appreciated! Thanks again.**
Thanks for help, I am using the standard blueprint first person template if that helps.
I believe I may have sorted it, although I cant be sure its the best way to do so.
I have gone into the character blueprints defaults panel and changed ‘Use controller rotation Pitch’ to a checked box and that has seemed to have fixed it. Again I don’t know if this is the best way to go about it
Thanks to both of you!
I think you did it wrong in a classical way.
Notice the capsule also rotated? yeah, if you eventually have a 3rd person mesh you will see the entire person gets rotated as well.
Even when in prototype stage, make sure you have all the mesh shape available like in templates, because you can always swap them out when you like.
And if you found that you can’t swap out something because the bp are too tightly integrated, then you must stop and review your approach.
That being said, aiming is not something based on actor rotation, I think that’s why you failed.
If you check example content, there is a aiming example using Owen in third person, while not replicated, you can check how the character is blending aiming while moving.
After you check that, make sure the character side of control variable replicated, then it would be easy later on for all your other animation replication.
Yes, instead of using the player’s controller to get the rotation, instead use “ThirdPersonCharacter->Pawn Get Base Aim Rotation” as this will replicate from server to clients and vica-versa fine without the need for any replication events .