- Home /
Clientside Prediction in the Networking Example
Hey there!
I am trying to setup an authoritative server setup with client prediction for my fps game. I am using the GraduallyStateUpdate.cs from the Networking Example. Overall it´s working but I the camera is jerking all the time, because the script does error correction nearly every frame.
This is really weird since both, the Server and the Client, run on the same computer...
Does anyone knows how to solve this issue?
I already tried to manipulate the parameters of the script but that doesnt change anything...
Thanks in advance!
Answer by ScroodgeM · Jul 28, 2012 at 06:29 PM
i 99% sure that all you need is to set camera's position:
AFTER applying character position
EVERY time character is moved
so, if your FPS is physic-based, set camera position in FixedUpdate() method.
if on network sync your character is moved, run camera's positioning right after that.
and, move camera's positioning script to the end in 'script execution order'
Answer by Florian22222 · Jul 28, 2012 at 11:38 PM
I already solved it. But you were right! Thank you. The problem was that i setted the input from the character motor in update but he used fixed update.