dimforge / dimforge/bevy_rapier

Adding Sensor Component only works for Dynamic Rigid Bodies

Open
#469 1 comment 0 reactions 0 assignees View on GitHub
A-Dynamics A-Integration C-Bug D-Medium P-Medium S-not-started
Dominant language
Rust
Stars
1.6k
Forks
282
PR merge metrics
No merged PRs in 30d

Description

> 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.

```rust
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.