How do I go about replicating this movement function? I need to use a timeline with setactorlocation for gameplay abilities in my project but it causes jitter on clients over netplay.
asked May 23 '18 at 10:34 PM in Blueprint Scripting
I'm not sure. I struggle with getting smooth network movement when I use anything other than the built-in smoothing of the CharacterMovement component.
Something to keep in mind that might help though, is that when you set an Actor to Replicate Movement, then the server will force the clients to update to the server's version of the actor's location whenever it does another update to the clients. If both the clients and the server are telling the character to set its location, then even if they start the exact same movement at the exact same time, then you'll get this problem:
Hence the jitter. Now it's not quite that bad because Velocity is also replicated, so any missed position updates are filled in by the velocity moving the character in between network updates (but will have to jitter-adjust if there was a change in direction, if there's no network smoothing).
Now, if you're using CharacterMovement component, then eveything I just mentioned gets smoothed over and hidden by the nice built-in smoothing algorithms. So then why is it still jittering?
I could be due to that timeline you have going there. Differences in framerate between the two machines, plus ping delays, are probably not smoothed by the charactermovement algorithms.
I'm not sure how to fix this as I've never succeeded in getting smooth movement on anything that's not built-in charactermovement, but it might be worth trying to tell it to stop replicating movement until the Timeline is finished, then turn movement replication back on with a lerp or something. IDK. If you figure it out, let me know!
answered May 24 '18 at 05:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here