diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs index 6879a80b6..7cc63e5e1 100644 --- a/src/geometry/contact_pair.rs +++ b/src/geometry/contact_pair.rs @@ -244,6 +244,7 @@ pub struct ContactPair { /// Event bookkeeping: `CollisionEvent::Started` emission and force-event /// threshold status. pub(crate) event_status: PairEventStatus, + #[cfg_attr(feature = "serde-serialize", serde(skip))] pub(crate) workspace: Option, /// State cached at the last full narrow-phase update, allowing the update to be /// skipped ("recycled") while the colliders' relative pose stays within diff --git a/src/geometry/narrow_phase/mod.rs b/src/geometry/narrow_phase/mod.rs index 65ae91da2..7a868991f 100644 --- a/src/geometry/narrow_phase/mod.rs +++ b/src/geometry/narrow_phase/mod.rs @@ -447,6 +447,14 @@ impl NarrowPhase { } } + /// Replaces the query dispatcher used by this narrow-phase. + pub fn set_query_dispatcher(&mut self, d: D) + where + D: 'static + PersistentQueryDispatcher, + { + self.query_dispatcher = Arc::new(d); + } + fn refresh_awake_body_mask(&mut self, islands: &IslandManager) { self.awake_body_mask.clear(); let len = islands