Predicted Lag Compensation will cause mispredictions on high ping

As far as I understand, the interpolated entities are not updating their position between loops in the prediction, but using their final interpolated position. By that if you attempt to predict towards interpolated entities using lag compensation, it will correctly predict the first time as the interpolated tick will match the delay for the player. In later runs however, it may mispredicts as the interpolated position has now been updated to future position - in regards to a repredicted tick and delay later used server side. This becomes a greater problem the faster the interpolated entities move and the higher ping the client has. I think we either want to backup the interpolated entities for physics world history, or fetch the correct lag compensated position for interpolated entities each tick (may even make the simulation more deterministic in general to not deal with fractions in physics), and apply the interpolated position after the prediction loop. Probably only need to do this for the specific interpolated physics entities.

Thoughts? Am I missing something?
Thanks.

I was missing something, the PhysicsWorldHistory only stores on first full tick. Still think that not using interpolated position if possible in physics would help with determinism here.

2 Likes