Skip to content

Not getting CollisionEvent's from bevy_rapier2d #6805

Answered by rparrett
aspiringLich asked this question in Q&A
Discussion options

You must be logged in to vote

From https://rapier.rs/docs/user_guides/bevy_plugin/advanced_collision_detection#collision-and-contact-force-events

Collision events (resp. contact force events) are only generated between two colliders if at least one of them has the ActiveEvents::COLLISION_EVENTS flag (resp. ActiveEvents::CONTACT_FORCE_EVENTS flags) in its active events.

The "flag" language is slightly confusing there, but you need to insert the ActiveEvents::COLLISION_EVENTS component onto the entities.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aspiringLich
Comment options

Answer selected by aspiringLich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants