aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-11-30 15:41:32 +0100
committerCrozet Sébastien <developer@crozet.re>2020-11-30 15:41:32 +0100
commit1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67 (patch)
tree8bdad3f6e1a18b17b1d7898f64052927138bd4d4 /src/dynamics
parent715d0fe16eb8ca9df90ff161ade4bf809a780043 (diff)
downloadrapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.tar.gz
rapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.tar.bz2
rapier-1e0f76b02c3766f2f1b5bd6b7362c0c993ffee67.zip
Add a 2D demo for locking rotation.
Diffstat (limited to 'src/dynamics')
-rw-r--r--src/dynamics/rigid_body.rs4
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")]