I’m posting here a bug report, because I don’t know if the new form sent my report properly and I want to go sure, someone else confirms the bug:
__
Edit: The bug is now reported and unresolved. Issue-ID = UE-58099
I keep this post here for more detailed information, because the new description is a bit missleading for people, which don’t know, that the player is actually not jittering, but being corrected, because he doesn’t get carried from the platform at slow “rotational” speeds.
__
Steps to reproduce:
1: Start a third person project.
2: Create an actor blueprint and put in a cube as a child of DefaultSceneRoot and scale it big enough in X and Y so it acts as a platform.
3: Add rotation logic: EveryTick->AddRelativeRotation. Target = RootComponent. DeltaRotation Z(Yaw) = 0.01. Compile the blueprint.
4: Open the “ThirdPersonCharacter” blueprint, click “CharacterMovementComponent” and check
“Ignore Client Movement Error Checks and Correction”, to make the effect more visible. Compile the “ThirdPersonCharacter” blueprint.
5: “Run on dedicated Server”. Number of players: 1. Hit play and jump on the platform, idle at an edge or corner.
Result:
The player stays on the same world position, sliding over the platform, as if there was no friction.
Expected:
The player moves relatively with the platform.
Description:
The following are only assumptions based on my attempts to solve the issue. You can find a download link below the wall of text.
I tried to solve the bug. This is what I found until now:
In the CharacterMovementComponent.cpp, method: “UpdateBasedMovement”. At line #1805:
FVector const LocalBasePos = OldLocalToWorld.InverseTransformPosition(UpdatedComponent->GetComponentLocation() - BaseOffset);
OldLocalToWorld should be equal, if the character doesn’t move on the platform, if I got this correct.
I compared the vector on client and server. On the server, it stays equal (10 seconds idle-test).
On the client, it changes over time. The only incorrect behavior is on “ROLE_AutonomousProxy”. Authority and SimulateProxy run fine.
My guess was then, since OldLocalToWorld is a Matrix, using “OldbaseQuat, OldBaseLocation”, the method “SaveBaseLocation()” is called somewhere
at “ROLE_AutonomousProxy”. And I found one line. #1155:
else if (CharacterOwner->GetRemoteRole() == ROLE_AutonomousProxy)
{
// Server ticking for remote client.
// Between net updates from the client we need to update position if based on another object,
// otherwise the object will move on intermediate frames and we won’t follow it.
MaybeUpdateBasedMovement(DeltaTime);
MaybeSaveBaseLocation();
…
If I comment out “MaybeSaveBaseLocation();”, the behavior is different. So it might be related to this part of the class.
OldBaseLocation and OldbaseQuat are the only external(outside the methods scope) variables in “UpdateBasedMovement()” which can be different (at least I think so).
I found this bug, when I just solved relative rotational replicated movement on rotating platforms. At very slow speeds, the player was jittering again, but only at 0.01. A little bit faster and the bug isn’t present. So I reproduced the bug at the vanilla engine version 4.18.
It is not an fps related problem. I recognized this behavior at slowly increasing rotation speed using “speed * deltaTime”.
After removing the error checks, I saw it was not a normal jittering, but the player didn’t move at all and just being corrected from the server.
Additional Notes
If you download my project. You may have to recheck “Ignore Client Movement Error Checks and Correction” in the “ThirdPersonCharacter” blueprint.
I can’t keep it checked after a project reload (yes I hit the save button :))
ps: ignore the project name (deleteMe), it is just an info for me, that I don’t need it anymore at the end of the day.
Project link: