Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Make tuple fields on ColliderHandle and RigidBodyHandle pub, or provide accessors? #174

Description

@edisno

I use rapier3d::prelude::NarrowPhase directly and its method contact_pair needs access to the inner ColliderHandle. Could we accommodate for this?

--- a/rapier/src/lib.rs
+++ b/rapier/src/lib.rs
@@ -56,14 +56,14 @@ pub struct RapierPlugin;
 /// It is automatically inserted and removed by heron.
 /// It is only useful for advanced, direct access to the rapier world
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Component)]
-pub struct RigidBodyHandle(dynamics::RigidBodyHandle);
+pub struct RigidBodyHandle(pub dynamics::RigidBodyHandle);

 /// Component that holds a reference to the rapier collider
 ///
 /// It is automatically inserted and removed by heron.
 /// It is only useful for advanced, direct access to the rapier world
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Component)]
-pub struct ColliderHandle(geometry::ColliderHandle);
+pub struct ColliderHandle(pub geometry::ColliderHandle);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions