diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-11-30 15:41:32 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-11-30 15:41:32 +0100 |
| commit | 1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67 (patch) | |
| tree | 8bdad3f6e1a18b17b1d7898f64052927138bd4d4 /src | |
| parent | 715d0fe16eb8ca9df90ff161ade4bf809a780043 (diff) | |
| download | rapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.tar.gz rapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.tar.bz2 rapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.zip | |
Add a 2D demo for locking rotation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynamics/rigid_body.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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")] |
