bevy_rapier
bevy_rapier copied to clipboard
Simulate single rigidbody
I'm implementing server-authoritative movement. The client records movement input and applies it locally. The updates are then sent to the server. When the server calculates the result after one of my inputs and clients do not agree on the physics, I want to reset the player rigidbody to the server position. I should then resimulate the inputs the server has not yet processed, to arrive at a more correct position on the client.
The movement works by applying forces to a rigidbody. To resimulate it, I need to apply a force, calculate it's new position, and repeat this multiple times in one frame. Is there a way to simulate just the forces on one rigidbody, without running the rest of the simulation?