From fb20d72ee29de9311a81aec6eb9f02fd2aa35fc4 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 20 Feb 2022 12:55:00 +0100 Subject: Joint API and joint motors improvements --- src/dynamics/rigid_body_set.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dynamics/rigid_body_set.rs') diff --git a/src/dynamics/rigid_body_set.rs b/src/dynamics/rigid_body_set.rs index 34f7bdf..d6999ee 100644 --- a/src/dynamics/rigid_body_set.rs +++ b/src/dynamics/rigid_body_set.rs @@ -121,7 +121,8 @@ impl RigidBodySet { } /// Insert a rigid body into this set and retrieve its handle. - pub fn insert(&mut self, mut rb: RigidBody) -> RigidBodyHandle { + pub fn insert(&mut self, rb: impl Into) -> RigidBodyHandle { + let mut rb = rb.into(); // Make sure the internal links are reset, they may not be // if this rigid-body was obtained by cloning another one. rb.reset_internal_references(); -- cgit