Netcode for Entities input delay and Cinemachine camera jittering on predicted ghost

Hi, i am currently building a racing game using DOTS and netcode for entities where i use Dots for the physics part and GameObjects for the visual part and i came across two challenges
1, Is there a way for me to have my local ghost immediately consume my inputs on the local machine (and not wait for the server to send the input) then reposition the ghost if the transform of the local ghost and that of the server are too far apart?
2, When i use cinemachine’s xyz damping’s the camera jitters a lot (probably because of the resimulation) so is there a walkaround for me to have a smooth camera while my vehicle moves?

I can answer the Cinemachine part. Cinemachine’s damping requires smooth movement of the target. If the target moves irregularly, there’s no amount of camera damping that can smooth it out. The solution is to interpolate your simulated positions correctly, according to the elapsed deltaTime. If for some reason smooth movement is not possible, then the alternative is to rigidly fix your camera to the moving object. That way, the object won’t jitter in the frame - although the background will, but that’s generally less irritating. However, it’s much better to make the movement smooth.

1 Like