I've been researching and experimenting with using simple physics in a multiplayer game. Specifically, I'm really only interested in having a character controller move around a 3D environment. To do this, I've been using PhysX, which works great. My game doesn't have any need for more advance physics than that.
I have read and followed a lot of the material on Glenn Fiedler's site, which everyone seems to point people to when they start asking these sorts of questions. His material has been really helpful and I've got something working. However, there is one part that I simply cannot get working. That is applying the corrected state on the client when received from the server. Specifically, Glenn says to "rewind" the physics state of the player, apply the correction from the server and then replay the rest of the player's moves.
This works fine in a situation where you have explicit control over the player's movements. However, when using a physics engine (like PhysX or Bullet) you have virtually no control over the player character controller's state or the movements it makes. All you can do is apply forces to the player's character controller. It's not possible to rewind the physics state of the character controller to correct it and then reapply the player's unacknowledged moves. How have other games done this using physics engines like these?
The best I've been able to come up with so far is to apply corrections using forces. For example, when a correction comes back from the server and I determine that the player's current position is out by a bit from where the server says it should be, I start applying small forces to the character controller to gradually bring it inline with the server over several frames. There's no rewinding going on with this. If the client and server disagree by too much, then I just snap the player to where they should be (rarely happens). Although this "seems" to work, there is a lot of rubber-banding going on when the server says you have run into an object, but the client thinks you haven't for example.
Do other games not use entire physics engines for character movement around a 3D level? Do they do something else that gives more control to allow for rewinding and correction?