I finally just started making some very simple tests with coherence, so far I just have a new project, using a movement plugin for the player character (Easy Character Movement 2, just for simple prototyping), added Sync to the transform position/rotation and animation parameters so that the animation is synced (all just with the CoherenceSync checkboxes), turned rigidbody kinematic on remote, disabled inputs on remotes… just the very very basics, but even when testing with 2 builds connected to a local replication server, I feel a considerable amount of jitter in the movement from remotes… I’ve played a bit with the interpolate settings, I checked the Campfire example (in which I dont see any jitter), copied the optimization settings (increased frequency of update, value ranges etc), and it seems a bit better on my example but still not great.
Please check this message on Discord, in which I attached a video of what I mean:
I would expect that in such as simple example, it should feel super smooth since it is the best case possible, so I am not sure if I am doing something wrong?
Hi Allan, welcome to the forums and more in general to our community!
It should definitely be smooth! Your setup seems correct, the only thing I can think of is: besides optimisation settings (aka the “Optimize” button that brings up the specific window), are you also setting the bindings to interpolate, in the Configuration window?
Maybe enabling multiple event functions creates the jitter? I usually use either Update OR FixedUpdate.
And then, another point: how does Easy Character Movement 2 apply movement? Does it write to the Transform’s position, does it use AddForce on the RB, or does it modify its velocity? This might give an insight into what’s happening.
What I was thinking originally is that, if the controller used AddForce there might have been something lost there because the object which should receive the force is kinematic. But with SetPositionAndRotation there’s no inertia at play.
However, another thought: is the Rigidbody set to interpolate?
This writes directly to the transform’s position and rotation, and it’s something many people want. But try maybe switching it to “Interpolated”, and see how it goes? That would be the equivalent of calling SetPosition and SetRotation on the RB, which is what the character controller does.
I’ve just checked and the Rigidbody is configured to interpolate. I’ve just made anoter test with the latest configs, so that is the optimization settings, all we talked about above, and now also using RigidbodyUpdateMode as Interpolate, and this is the result:
Using local replication server:
Using a Cloud room:
It is definitely better than it was in the first video, but given that this is basically the best possible scenario, I would still expect it to be smoother. Should I remove the interpolate from the Rigidbody/update mode? What would be the ideal config?
I’m not sure, it’s all a combination of factors, so I can’t say for certain, you might have to turn it off and test. But in my head, it’s ok if it stays. You might have to check if Extrapolate gives better results than Interpolate though!
But anyways, it looks better now though, right? To my eyes it seems like the character is moving in space quite fluidly. There seems to be a slight hitch in the animation when it stops, but maybe that’s not related to movement (?)
Could make sense to try to debug this without animation (or even better, with a simple capsule with arms ) so you can clearly see what’s happening.