-
I'm getting an entity from a raycast, and I need to get the root rigidbody from that entity. I also need to access collider properties, such as friction or mass. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
i use bevy rapier 3d btw. |
Beta Was this translation helpful? Give feedback.
-
From the To access the collider properties, as you have the Collider entity, you can query for its related components listed in https://docs.rs/bevy_rapier3d/0.28.0/bevy_rapier3d/geometry/struct.Collider.html. |
Beta Was this translation helpful? Give feedback.
From the
RapierContext
you can retrieve the rigidbody with https://docs.rs/bevy_rapier3d/0.28.0/bevy_rapier3d/plugin/struct.RapierContext.html#method.rigid_body_entityTo access the collider properties, as you have the Collider entity, you can query for its related components listed in https://docs.rs/bevy_rapier3d/0.28.0/bevy_rapier3d/geometry/struct.Collider.html.