Hello. I’m a little confused about how to get my character movement networked correctly. I’m running into a problem where if there’s a network correction, there tends to be a lot of corrections in a row. This causes two issues: 1, The character’s movement tends to be jittery. And 2, all those corrections can sometimes end up overriding my user’s input and the character gets stuck in the wrong state. Of course, the higher the ping, the worse this gets.
I have a basic example setup that where my character can press mouse 1 and it pulls them towards what they’re looking at. You can check it out here: GitHub - mpeterson2/CMCTest. The 2nd commit is all the relevant code.
I’ve been testing by setting p.NetShowCorrections 1
on a listen server NetEmulation.PktLag 200
on a client, then pulling myself on the client. Pretty much immediately I’m getting corrections and my movement is very jittery. And every now and then I get stuck in the pulling state.
Any ideas what I can do to improve this or what I might be doing wrong? Thanks!