-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Colliders don't work without rigid body #165
Comments
Hi! Colliders without parents attached should still work. Did you set the proper |
Hmmm, no I didn't use ActiveCollisionTypes. Should we be using BTW, I'm not quite sure what you mean by "without parents attached." This is the code we're using: commands
.spawn()
.insert(MAIN_BAG_COLLIDER.clone())
.insert(Sensor(true))
.insert(BAG_COLLIDER_GROUP)
.insert(RigidBody::Fixed) // Adding this line makes the with_children colliders work. Otherwise, they don't seem to do anything.
.with_children(|parent| {
parent
.spawn()
.insert(BOUNDARY_BAG_COLLIDER.clone())
.insert(Sensor(true))
.insert(BAG_BOUNDARY_COLLIDER_GROUP);
parent
.spawn()
.insert(LID_BAG_COLLIDER.clone())
.insert(Sensor(true))
.insert(BAG_LID_COLLIDER_GROUP);
}) |
That's correct: |
Ok, just tried |
Ah, that’s unfortunate. Perhaps we have a bug then. Do you have a minimal piece of code to reproduce the problem (your code above does show how the colliders are initialized, but not what you expect them to do)? |
We've been using the colliders like this: let foo = rapier_context
.intersection_with_shape(
collider_transform.translation,
collider_transform.rotation,
collider,
BAG_BOUNDARY_COLLIDER_GROUP.into(),
None,
); Unfortunately I can't check the debug renderer because of #157 presumably (we're using the |
Also update enemy config with min distance to target Here are some References/Notes for collision updates: - dimforge/bevy_rapier#165 (comment) - https://rapier.rs/docs/user_vuides/bevy_plugin/colliders/#active-collider-types - This enabled collision detection (in our case static to static) - https://rapier.rs/docs/user_vuides/bevy_plugin/colliders/#active-events - This lets us read these collision as events - https://rapier.rs/docs/user_vuides/bevy_plugin/advanced_collision_detection - setup code for the event reader
For reference, I'm also getting this issue. Without adding a Cargo:
|
Take event2 example and change rigid body to non dynamic and move it with bevy inspector egui
|
I only need colliders and none of the other physics stuff. It the correct way to get child colliders working to use a fixed rigid body? Or can it be made so child colliders still work without the parent having a rigid body component? The old version handled this as far as I can tell.
The text was updated successfully, but these errors were encountered: