diff options
| author | Triuman <hs@demodern.de> | 2023-08-10 09:29:11 +0200 |
|---|---|---|
| committer | Triuman <hs@demodern.de> | 2023-08-10 09:29:11 +0200 |
| commit | fd0c8d3dc77854dd5f0465d394fc1a948fb17cac (patch) | |
| tree | 08ce6c4deda35a9e6740aff30e297a0d4e18e0f1 | |
| parent | f7b02f2a1d7f219cba668d6681b5c2803f294c50 (diff) | |
| download | rapier-fd0c8d3dc77854dd5f0465d394fc1a948fb17cac.tar.gz rapier-fd0c8d3dc77854dd5f0465d394fc1a948fb17cac.tar.bz2 rapier-fd0c8d3dc77854dd5f0465d394fc1a948fb17cac.zip | |
fix lock_rotations doesn't work both ways
| -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 060b777..3228d9b 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -193,7 +193,7 @@ impl RigidBody { #[inline] /// Locks or unlocks all the rotations of this rigid-body. pub fn lock_rotations(&mut self, locked: bool, wake_up: bool) { - if !self.mprops.flags.contains(LockedAxes::ROTATION_LOCKED) { + if locked != self.mprops.flags.contains(LockedAxes::ROTATION_LOCKED) { if self.is_dynamic() && wake_up { self.wake_up(true); } |
