Top Down Rotation Replication Problem

Actor Rotation Replication Problem

I am attempting to basically let other clients know when my character is rotating. I can not seem to get it working properly. At the moment, I can get it show the rotation to everyone else but the current client. I have attempted multicast and varying ways to get this working, but nothing seems to be working. I have even replicated the current actor and sending that variable but that did not help.

Replication Variable

ActorRef Variable

TopDownCharacter Blueprint Construction Script


TopDownCharacter Blueprint Event Graph

The Middle client is the one I am moving.


It does not want to change the current client positioning for some reason.

When I try to “multicast” SetActorRot, rotation no longer works at all.

Executes on server for both SetActorRot and SetRotVar custom events only work somewhat properly.

So the underlying question right now is…how do I get it to rotation to work via client and server properly?

Thank you for your help.

I had the same problem when working on my game but I found a solution.

What you need to make a custom event running on owning client and setting a transform or rotation you want. Then you need two more custom events one on Multicast and one on Run On Server as seen in the image below. If this is a player character you do not want any variables replicated or the server will just try and sync the rotations.

http://i.imgur.com/86h2EwC.png

Over In the Animation Blueprint you need to make a update animation event and have the rot you set in the character blueprint Rot Instance and have that variable replicate to server through a run on server custom event and set a new rotation variable different then the one that was set through the player blueprint as seen in the image below.

Then create a state machine.

Then in there and create a Animation State.

Then in the Animation State take the new Rotation and hook it up to a Modify bone node. Select the bone you would like to modify and uncheck the pins you don’t want to use. If doing a rotation like I did set Rotation Mode to Replace Existing and Rotation Space to World Space. Get a Idle Animation of your player and hook it up to the left side of the modify bone and then run the modify bone into the Final Animation pose as seen below.

I got it working using another method actually, but Sir_Enhance_Alot, your comment helped me realize something very critical. Something about blueprint flow.

For anyone who wants “my solution” for this, which is pretty “effective”, here it is.

Top Down Character Blueprint


I did replicate the “Rotation” as well.

Also, the get mouse rot function grabs the direction the player is facing at with their mouse.

Proof



Thanks for helping me.

It works!Thank you very much!