From 1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 30 Nov 2020 15:41:32 +0100 Subject: Add a 2D demo for locking rotation. --- src/dynamics/rigid_body.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 9832ff7..98ae47a 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -634,7 +634,7 @@ impl RigidBodyBuilder { /// /// This is equivalent to `self.mass(0.0, false)`. See the /// documentation of [`RigidBodyBuilder::mass`] for more details. - pub fn lock_translations(mut self) -> Self { + pub fn lock_translations(self) -> Self { self.mass(0.0, false) } @@ -644,7 +644,7 @@ impl RigidBodyBuilder { /// `self.principal_inertia(Vector3::zeros(), Vector3::repeat(false))` (in 3D). /// /// See the documentation of [`RigidBodyBuilder::principal_inertia`] for more details. - pub fn lock_rotations(mut self) -> Self { + pub fn lock_rotations(self) -> Self { #[cfg(feature = "dim2")] return self.principal_inertia(0.0, false); #[cfg(feature = "dim3")] -- cgit