diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-02-20 14:21:59 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2022-03-20 21:49:16 +0100 |
| commit | 28cc19d104d986db54d8725e68189070bef31a8a (patch) | |
| tree | a82eda017e7bf2f8715b10450bcabde841440af4 /src/geometry/contact_pair.rs | |
| parent | 412fedf7e30d7d2c4136ee6f6d0818184a539658 (diff) | |
| download | rapier-28cc19d104d986db54d8725e68189070bef31a8a.tar.gz rapier-28cc19d104d986db54d8725e68189070bef31a8a.tar.bz2 rapier-28cc19d104d986db54d8725e68189070bef31a8a.zip | |
Allow removing a rigid-body without auto-removing attached colliders
Diffstat (limited to 'src/geometry/contact_pair.rs')
| -rw-r--r-- | src/geometry/contact_pair.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs index 92b7800..cb70663 100644 --- a/src/geometry/contact_pair.rs +++ b/src/geometry/contact_pair.rs @@ -74,6 +74,12 @@ impl ContactPair { } } + pub fn clear(&mut self) { + self.manifolds.clear(); + self.has_any_active_contact = false; + self.workspace = None; + } + /// Finds the contact with the smallest signed distance. /// /// If the colliders involved in this contact pair are penetrating, then |
