bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Simulate single rigidbody

Open Alainx277 opened this issue 2 years ago • 0 comments

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?

Alainx277 avatar Feb 20 '22 14:02 Alainx277