Collision with everything but other instance of it #490
Unanswered
AlexandreFleutelot
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
In my bevy application I spawn the folowing bundle:
commands.spawn((
TransformBundle::from(Transform::from_xyz(spawner_tf.translation.x, 275.0, 0.0)),
RigidBody::Dynamic,
Collider::capsule_y(10.0, 5.0),
KinematicCharacterController{
up: Vec2::Y,
offset: CharacterLength::Relative(0.01),
slide: true,
autostep: Some(CharacterAutostep {
max_height: CharacterLength::Relative(0.3),
min_width: CharacterLength::Relative(0.5),
include_dynamic_bodies: true,
}),
max_slope_climb_angle: 0.78, //45 deg
min_slope_slide_angle: 0.52, //30 deg
snap_to_ground: Some(CharacterLength::Relative(0.2)),
filter_groups: Some(CollisionGroups {
memberships: Group::GROUP_1,
filters: Group::ALL.difference(Group::GROUP_1)
}),
..default()
},
LockedAxes::ROTATION_LOCKED,
GravityScale(3.),
));
I would like these entities to collide with evething except other instance of it (i execute this spawn command multiple time). I have used the filter_group parameter of the kinematicCharacterController but it doesnt work.
How should I proceed to get this behavior?
Thanks,
Alex
Beta Was this translation helpful? Give feedback.
All reactions