Download

Simple Move to Location won't replicate Rotation

I can’t get the client to see it’s own rotation when it call the Simple Move to Location. The movement works, as well as animation, but not the rotation.

Clients can see any other Client’s character rotation and movement fine, as well as the Server’s.
The server can see all movement and rotation fine, including it’s own.

Hence I suspect the Client is overriding the rotation of it’s own character, but I have no idea where it does that or how to prevent that from happening.
The character have a camera set on itself in the blueprint if that mean anything.

(Side issue, https://answers.unrealengine.com/questions/ask.html bugs out on selecting topic for me…)

Do you have Replicates and Replicates Movement turned on? If so that should handle the rotation/location replication itself for clients.

Also out of interest, what’s the reasoning for using a Gate with Event Tick for the setting of the new position? Surely just a single mouse click can call that event on it’s own? You might experience problems with throttling if you are sending out an RPC on tick, as that RPC will be called for every tick that the button is held down.

Where should I turn on replicates and replicates movement?

Gate is used so that you can hold down the mousebutton and have the character follow the mousepointer around.
Though, that could probably be solved differently using only the mouse pressed and released.

Ah I see, might be a good idea to add a short delay to that so the delay between RPC’s is even :slight_smile:

Replicates and Replicates Movement can be turned on in the Blueprint under Defaults->Replication

Right, replicates and replicates movement is checked.
I still need to run the function on the server, otherwise it don’t seem to move at all.

Ugly workaround is to set a replicated rotation on server side, then have the client rotate the character manually every tick…
I would prefer a better workaround, as that seems to make the client animation appear as walk, while the server portray it as running :stuck_out_tongue: (As well as being an ugly hack…)

No other suggestions as to how this can be solved?
Constantly updating a rotation variable manually cause lots of networking that shouldn’t be necessary.

I know that this post is old, but this may help someone :wink:
I have no need to replicate rotation so i calculate it client-side based on pawn velocity.

I know this is an ancient post, but I stumbled upon this in 2020 with unreal engine 4.25 trying to get topdown point and click movement working in multiplayer. So this might help people stumbling upon this post as well!

I used this simple tutorial!

(52) Convert Topdown template to Multiplayer - YouTube](https://www.youtube.com/watch?v=22oMcygkEGQ)

One thing the tutorial doesnt mention and that makes it completely not work is that the GameMode should have GameModeBase as parent class instead of the default GameMode. Switching this immediately made everything work for me!