Is there any way to force a fixed update?

Without getting into too much detail, I'm working on a client/server multilayer game and im rolling my own reliable UDP network code. Right now I'm hung up on getting client side prediction for physics working the way I've seen it done in other engines because there doesn't seem to be a way to force FixedUpdate to happen on the current frame.

Example scenario:

  1. Client bumps into a box locally, box reacts with physics.

  2. Server is authoritative, so it says "no, you had latency- somebody knocked the box out of your path and you missed . Here is the new transform, velocity, etc"

  3. Client gets new values for the box and forces a fixed update so the physics simulation plays correctly on the client machine.

So in my situation, I can't force a fixed update so the simulation continues with bad data until the next fixed update, which causes worse jittery/jumpy behavior since the clisn't is that much further behind the server by the time a fixed update happens.

Anybody have any suggestions on where to go from here?

Have you tried playing with how often FixedUpdate() gets called? You can mess with it in the Time Manager

Maybe not the best solution but something to get the wheels turning :slight_smile:

Have you tried deferring changes and then applying network changes at the start of fixedupdate?