How to make actor physics replication work with medium ping

TL;DR, it’s an unsolvable problem. You can’t do client-side prediction in a physics engine easily, there isn’t a one-size-fits-all solution for this which is why it doesn’t exist in the engine nor on marketplace.

The modern “solution” is to give the client-authority over the object they are controlling, and use anti-cheat detection and verification on the Server. That’s the only way you can give a smooth experience to the client. Even a deterministic physics engine won’t save you from input lag or desync. All of the objects within the physics scene can affect one another. Even Character Movement Component (which is a tightly controlled simulation) has trouble resolving when two player characters are running into each other.

Even Fortnite uses client-authoritive physics for it’s vehicle - and given that it’s probably the most popular game in the world, you should be able to get away with it too. Naturally, nobody is going to disclose how their anti-cheat works.

There are plugins on the marketplace that claim to do physics prediction - they are all talking rubbish. Any claimed “solution” I’ve seen so far is either completely unscalable, bespoke to the problem it’s trying to solve, suffers terrible performance and/or still falls apart when objects collide with each other. Take it from someone who has dealt with this for years - accept that client authority is the only way and integrate some decent anti-cheat that fits for your scenario.

Also a note: people love to throw “rocket league” out there as an example of client-predicted physics. Once again, the have a very specific and deterministic physics simulation, and use a completely bespoke solution that works for them. They only have a maximum of 9 physics objects to worry about, often fewer. It’s not a problem for that scenario.

3 Likes