Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Sensor Component only works for Dynamic Rigid Bodies #469

Open
jakelacey2012 opened this issue Nov 19, 2023 · 1 comment
Open

Adding Sensor Component only works for Dynamic Rigid Bodies #469

jakelacey2012 opened this issue Nov 19, 2023 · 1 comment
Labels
A-Dynamics A-Integration very bevy specific C-Bug Something isn't working D-Medium P-Medium S-not-started Work has not started

Comments

@jakelacey2012
Copy link

Sensor colliders on the other end don't generate contacts: they only generate intersection events when one sensor collider and another collider start/stop touching. Sensor colliders are generally used to detect when something enters an area.

https://rapier.rs/docs/user_guides/bevy_plugin/colliders

This sentence is misleading, it suggests that I can simply just add the Sensor component and I the entity will not be collidable. However this will only be the case if the entity also contains a ridgid body component.

Screenshot 2023-11-19 at 20 45 49

The squares around this player are child components that are made up like this.

builder
   .spawn((
      Sensor {},
      Collider::cuboid(10., 10.),
      Transform::from_xyz(20., 0., 0.),
    ));

These should not be collidable, but they are - they are only Sensor components when the parent entity is a dynamic component. I might be missing something here though :)

Screenshot 2023-11-19 at 20 48 35
@sebcrozet
Copy link
Member

Interesting, that looks like a bug in bevy_rapier. I’ll transfer the issue to its repo.

@sebcrozet sebcrozet transferred this issue from dimforge/rapier Jan 24, 2024
@Vrixyz Vrixyz added C-Bug Something isn't working D-Medium P-Medium S-not-started Work has not started A-Integration very bevy specific A-Dynamics labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dynamics A-Integration very bevy specific C-Bug Something isn't working D-Medium P-Medium S-not-started Work has not started
Projects
None yet
Development

No branches or pull requests

3 participants