Save/Load CharacterController for server reconciliation
Posted: Fri Feb 26, 2016 1:47 pm
Hello,
I'm trying to implement client-side prediction and server reconciliation.
To perform client-side prediction I simulate entire physical world applying incoming user's command (like move forward, jump, crouch, etc).
To perform server reconciliation I get snapshot from server (that is actually outdated), apply position,
linear and angular velocities to physical objects and replay simulation (applying stored user's command) from this point to client's present time.
While position and velocities seem to be enough to store and replicate state of physical objects,
CharacterController requires more properties to be stored and restored.
For example, I press "Jump" and character controller start jump.
Then snapshot arrive and entire world is rolled back and re-simulated.
But character controller while being rolled back stays in some "jumping state" and starts jumping before applied jump command.
See the attached figure.
How to save and load CharacterController -OR- rollback physical world?
Thanks for advance.
I'm trying to implement client-side prediction and server reconciliation.
To perform client-side prediction I simulate entire physical world applying incoming user's command (like move forward, jump, crouch, etc).
To perform server reconciliation I get snapshot from server (that is actually outdated), apply position,
linear and angular velocities to physical objects and replay simulation (applying stored user's command) from this point to client's present time.
While position and velocities seem to be enough to store and replicate state of physical objects,
CharacterController requires more properties to be stored and restored.
For example, I press "Jump" and character controller start jump.
Then snapshot arrive and entire world is rolled back and re-simulated.
But character controller while being rolled back stays in some "jumping state" and starts jumping before applied jump command.
See the attached figure.
How to save and load CharacterController -OR- rollback physical world?
Thanks for advance.