Skip to main content

handle_soft_body_tears

Function handle_soft_body_tears 

Source
pub fn handle_soft_body_tears(
    commands: Commands<'_, '_>,
    contexts: Query<'_, '_, (Entity, &mut RapierContextSimulation, &mut RapierContextColliders, &RapierContextJoints, &mut RapierRigidBodySet)>,
    clusters: Query<'_, '_, &mut SoftBodyCluster>,
    cluster_components: Query<'_, '_, (Has<SoftBodyClusterPinned>, Option<&'_ SoftBodyClusterKinematicTarget>, Option<&'_ SoftBodyClusterShapeMatching>, Option<&'_ SoftBodyClusterMaterial>)>,
    indexed_components: Query<'_, '_, (Option<&'_ SoftBodyPinnedParticles>, Option<&'_ SoftBodyKinematicTargets>, Option<&'_ SoftBodyAttachments>, Option<&'_ SoftBodyExternalForce>, Option<&'_ SoftBodyExternalImpulse>, Option<&'_ SoftBody>)>,
    tear_events: MessageWriter<'_, SoftBodyTearEvent>,
)
Expand description

System responsible for spawning the entities of the soft bodies split off by tears, and for sending the corresponding SoftBodyTearEvent messages.