[BUG] Character Rotation Replication Issue
I am seeing a bug when the rotation of a character is replicated, specifically it's the roll that is causing problems.
The rotation works fine on the server or autonomous clients, but on simulated clients the rotation seems to be offset.
I've taken a look at the ReplicatedMovement being received on the client, and the location/correction is correct.
It appears that only the character visual is incorrect, the actual capsule appears to be in the right position/rotation. My suspicion is that this is caused by the mesh component (which is a child of the capsule) not rotating correctly on the client (Like the samples, my mesh location and rotation has been tweaked to make it line up with the capsule). Could this be on the rendering side of things?
I've also confirmed that this still occurs with 4.2.
This is easy to achieve with the Third Person Code Template:
I suspect that the assumptions about a vertically oriented capsule in the mesh offset code is messing with the mesh translation. It appears that the capsule itself is oriented correctly (based on the "show collision" result you posted, though it would be nice to confirm that with a shot on both sides).
Try overriding UCharacterMovementComponent::SmoothClientPosition and SmoothCorrection to do nothing in your own component and see if that makes a difference. That is only run on the client and is the only thing I can think of that is messing with the offset on the client and not the server.
answered Jun 10 '14 at 05:33 PM
A "Server" function executes only on the server. It is not replicated serve -> other clients.
You have two options:
answered May 23 '14 at 12:46 AM
I found a very simple solution for this! At least for characters in MOVE_Flying mode. Not sure it'll work for MOVE_Walking, but worth a try.
Anyway, it seems like all I needed to do was set bUseControllerRotationRoll to true on the pawn and...BOOM. No more server network smoothing fighting roll rotation :D
answered Jun 15 '17 at 12:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here