Reset the rigid-bodies internal links properly.
This commit is contained in:
@@ -84,11 +84,11 @@ impl RigidBody {
|
|||||||
|
|
||||||
pub(crate) fn reset_internal_references(&mut self) {
|
pub(crate) fn reset_internal_references(&mut self) {
|
||||||
self.colliders = Vec::new();
|
self.colliders = Vec::new();
|
||||||
self.joint_graph_index = RigidBodyGraphIndex::new(crate::INVALID_U32);
|
self.joint_graph_index = InteractionGraph::<()>::invalid_graph_index();
|
||||||
self.active_island_id = crate::INVALID_USIZE;
|
self.active_island_id = 0;
|
||||||
self.active_set_id = crate::INVALID_USIZE;
|
self.active_set_id = 0;
|
||||||
self.active_set_offset = crate::INVALID_USIZE;
|
self.active_set_offset = 0;
|
||||||
self.active_set_timestamp = crate::INVALID_U32;
|
self.active_set_timestamp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn integrate_accelerations(&mut self, dt: f32, gravity: Vector<f32>) {
|
pub(crate) fn integrate_accelerations(&mut self, dt: f32, gravity: Vector<f32>) {
|
||||||
|
|||||||
@@ -216,8 +216,8 @@ pub struct Collider {
|
|||||||
impl Collider {
|
impl Collider {
|
||||||
pub(crate) fn reset_internal_references(&mut self) {
|
pub(crate) fn reset_internal_references(&mut self) {
|
||||||
self.parent = RigidBodySet::invalid_handle();
|
self.parent = RigidBodySet::invalid_handle();
|
||||||
self.contact_graph_index = ColliderGraphIndex::new(crate::INVALID_U32);
|
self.contact_graph_index = InteractionGraph::<Contact>::invalid_graph_index();
|
||||||
self.proximity_graph_index = ColliderGraphIndex::new(crate::INVALID_U32);
|
self.proximity_graph_index = InteractionGraph::<Proximity>::invalid_graph_index();
|
||||||
self.proxy_index = crate::INVALID_USIZE;
|
self.proxy_index = crate::INVALID_USIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ impl MaybeSerializableData for PfmPfmContactManifoldGeneratorWorkspace {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clone_dyn(&self) -> Box<MaybeSerializableData> {
|
fn clone_dyn(&self) -> Box<dyn MaybeSerializableData> {
|
||||||
Box::new(self.clone())
|
Box::new(self.clone())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user