Hey guys,
So for a standard client-side prediction model to work, the client needs to be able to respond to the (always authoritative) server in a particular way.
For example; “I could create a buffer (a queue) of time-stamped moments, storing the physics info for the pawn, the active player inputs, and the time it occurred. I could then be compared the incoming server info with this info, and if it didn’t match, roll the physics back to that incorrect moment/tick, correct the data, then re-simulate based on the inputs stored for each successive moment/frame up until the present time/tick.” - [Networking] Interpolating replicated movement data in Pawn, without modifying source - C++ - Unreal Engine Forums
It’s the last part that doesn’t seem possible at this stage. How do I simulate multiple ticks’ worth of physics in one frame? I’m trying to roll-forward from the incorrect frame, as stated above, up to the current one, i.e.;
“The input and physics data I have stored on my client for the tick 2 frames ago is actually incorrect. I will set my new physics data to match the correct version for that tick (from server, delayed due to lag), then run the 2 frames needed, using the new physics info + my stored client inputs, to find where I ‘should’ be, and set my present-time data to match (move the actor, rotate it, etc).”
Any ideas?