dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
4.13k stars 253 forks source link

Immediate-mode simulation #324

Open Ralith opened 3 years ago

Ralith commented 3 years ago

Sometimes it is useful to simulate motion for a single object without updating the entire world. For example, in a networked multiplayer game, it might be necessary for a server to compute the motion of an object thrown by a remote player for several timesteps while time does not otherwise advance, to bring the server's model of the object into sync with the player's client-side prediction.

Rapier already supports computing contact manifolds independently of the progression of time via the QueryPipeline. A complete solution would expand on this with helpers to compute contact resolution forces and to integrate motion, with or without CCD. A higher-level step-like interface that bundles these up might be useful as well, though it's unclear if that might be significantly less flexible.

PhysX's immediate mode API is prior art.

sebcrozet commented 2 years ago

Transferred this issue to the rapier repository.