diff options
| author | AnonymousAcid <anonymousacid14@gmail.com> | 2023-12-26 22:47:33 -0800 |
|---|---|---|
| committer | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-01-24 22:59:14 +0100 |
| commit | 2ed34bacf4c32cea5fa419a604b685822392c77a (patch) | |
| tree | c1d66bccd2adc4d6a5a03bf089e567bab24e4451 /src/dynamics/joint | |
| parent | b96e61853bf3c541f26f2dcef33379dae5d932b4 (diff) | |
| download | rapier-2ed34bacf4c32cea5fa419a604b685822392c77a.tar.gz rapier-2ed34bacf4c32cea5fa419a604b685822392c77a.tar.bz2 rapier-2ed34bacf4c32cea5fa419a604b685822392c77a.zip | |
Fix dimforge#416 - update ball joint motor pos
Diffstat (limited to 'src/dynamics/joint')
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody_joint.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dynamics/joint/multibody_joint/multibody_joint.rs b/src/dynamics/joint/multibody_joint/multibody_joint.rs index 62fc434..11ea890 100644 --- a/src/dynamics/joint/multibody_joint/multibody_joint.rs +++ b/src/dynamics/joint/multibody_joint/multibody_joint.rs @@ -115,6 +115,9 @@ impl MultibodyJoint { let angvel = Vector3::from_row_slice(&vels[curr_free_dof..curr_free_dof + 3]); let disp = UnitQuaternion::new_eps(angvel * dt, 0.0); self.joint_rot = disp * self.joint_rot; + self.coords[3] += angvel[0] * dt; + self.coords[4] += angvel[1] * dt; + self.coords[5] += angvel[2] * dt; } _ => unreachable!(), } |
