Skip to content

Commit d208577

Browse files
committed
fix: disable collision between entities connected via joint
1 parent 79f086b commit d208577

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • crates/bevy_animation_graph_core/src/ragdoll

crates/bevy_animation_graph_core/src/ragdoll/spawning.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ pub fn spawn_ragdoll_avian(
100100
}
101101

102102
for joint in ragdoll.joints.values() {
103+
use avian3d::prelude::JointCollisionDisabled;
104+
103105
use crate::ragdoll::definition::{JointLabel, JointVariant};
104106

105107
let joint_entity = match &joint.variant {
@@ -174,7 +176,7 @@ pub fn spawn_ragdoll_avian(
174176
};
175177
commands
176178
.entity(joint_entity)
177-
.insert(JointLabel(joint.label.clone()));
179+
.insert((JointLabel(joint.label.clone()), JointCollisionDisabled));
178180
commands.entity(root).add_child(joint_entity);
179181
spawned.joints.insert(joint.id, joint_entity);
180182
}

0 commit comments

Comments
 (0)