diff options
| author | Triuman <hs@demodern.de> | 2023-08-10 09:26:27 +0200 |
|---|---|---|
| committer | Triuman <hs@demodern.de> | 2023-08-10 09:26:27 +0200 |
| commit | f7b02f2a1d7f219cba668d6681b5c2803f294c50 (patch) | |
| tree | a7562a86e1d09d562324ee852016b96002e13f10 /src/dynamics | |
| parent | 958fba8ed43328e7e33bb9585a735577fa1061e1 (diff) | |
| download | rapier-f7b02f2a1d7f219cba668d6681b5c2803f294c50.tar.gz rapier-f7b02f2a1d7f219cba668d6681b5c2803f294c50.tar.bz2 rapier-f7b02f2a1d7f219cba668d6681b5c2803f294c50.zip | |
fix lock_translations doesn't work both ways
Diffstat (limited to 'src/dynamics')
| -rw-r--r-- | src/dynamics/rigid_body.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 97974d9..060b777 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -255,7 +255,7 @@ impl RigidBody { #[inline] /// Locks or unlocks all the rotations of this rigid-body. pub fn lock_translations(&mut self, locked: bool, wake_up: bool) { - if !self.mprops.flags.contains(LockedAxes::TRANSLATION_LOCKED) { + if locked != self.mprops.flags.contains(LockedAxes::TRANSLATION_LOCKED) { if self.is_dynamic() && wake_up { self.wake_up(true); } |
