UProjectileMovementComponent causing Jittering when homing is true

Greetings,

My current project is a multiplayer game, and I have a small issue with Physics-based movement replication.

My actor, which has bReplicates and MovementReplicates set to true moves fine on the client until it locks on a character and starts homing, and then you can easily notice the stuttering and jittering of the actor moved by the UProjectileMovementComponent. I searched the AnswerHub and the forums about this issue but to no avail.

I also noticed the same issue when I attach a UPhysicsThrusterComponent to a ragdolled character. There’s jittering on the client as well in that case.
I should also note that most of the code runs only on the server.

I tried multiple approaches like replicating the UProjectileMovementComponent, make it home on the client as well, use ForceNetUpdate on Tick when the homing starts, update the transform on tick with a netmulticast … Nothing worked.

I should also mention that there’s no latency, what I mean is that I tested this in the same machine with different windows running.

Any help would be appreciated.
Cheers.

Hey,
Latency is always there even if you have 1-2 ms, thats count as latency :wink:

However replication is based on actor frequency and update priority (and lot of other things goes under the hood, but this is the most important for you)

https://docs.unrealengine.com/portals/0/images/Resources/ContentExamples/Networking/1_1/1_1_Replicates.png

Try increase update frequency and net priority to make sure your projectile replicates fast enough.
From other side you should check movement replication config too, because ue4 has some built in networking optimization. That means ue4 try to compress location / velocity / rotation values into a smaller chunk of data.
In some case this can cause jittering, because location / velocity / rotation is rounded up or down.
This can be critical if your object is rotating fast and rotation is rounded up to whole number :slight_smile:

Hope this helps. cheers

Hey, thank you for the response. I actually fixed the issue. When I tried the component replication first, I was missing SetIsReplicated(true) in the constructor of the actor containing the component. I also needed a Netmulticast function that sets the homing to true and sets the target when needed, and that fixed it. But your input still helps in case I want to increase the precision.
Cheers.

heh :smiley:
Glad to hear that… :wink: