Skip to main content

sync_soft_body_removals

Function sync_soft_body_removals 

Source
pub fn sync_soft_body_removals(
    commands: Commands<'_, '_>,
    contexts: Query<'_, '_, (&mut RapierContextSimulation, &mut RapierContextColliders, &mut RapierContextJoints, &mut RapierRigidBodySet)>,
    has_handle: Query<'_, '_, (), With<RapierSoftBodyHandle>>,
    removed_handles: RemovedComponents<'_, '_, RapierSoftBodyHandle>,
    orphans: Query<'_, '_, Entity, (With<RapierSoftBodyHandle>, Without<SoftBody>)>,
)
Expand description

System responsible for removing from Rapier the soft bodies whose SoftBody component was removed by the user (through component removal or despawn).