[Bug] Character Rotation replicated to all except owning client

Hello !

I have a weird issue with my character rotation, if I use SetActorRotation on server side, the rotation is correctly updated to all except owning client.

Build version: 4.15.1 (Launcher)

Repro Steps:

  1. Create a Third Person Template
  2. Add this input event and replicated event :

  1. Set Two players and check Run dedicated server

Thanks in advance !

1 Like

Hey JackBlue,

I don’t believe that this is a bug. I’ve gotten the actor rotation to replicate using the following setup:

First, I created a custom event, one that sets the rotation on the client using a RepNotify rotator variable, and another that is called on the server that simply calls the client’s NewRot event.

Then, make sure you open up your OnRep function that is created when you set your rotator variable to RepNotify, and add the following:

131523-onrep.png

Finally, on K, I call either the server or client version of my rotation event:

131524-3-24-2017+10-46-46+am.png

Using this, I printed the actor rotation and it was the same on both clients.

Ah, I just noticed that in my first screenshot I forgot to set ServerNewRot to Run On Server. Give that a shot.

Thanks for your fast reply Sean !

I guess you made your test without check the Run dedicated server box, because your BP work fine for a LAN game but not with a dedicated server.

Also your input event seem strange, only the remote branch will be call from a client ( except the one hosting the game in the case of a LAN mode )

1 Like

Hello. Have you solved this problem? I have the same problem.