diff options
| author | Dzmitry Malyshau <kvark@fastmail.com> | 2023-12-01 23:34:10 -0800 |
|---|---|---|
| committer | Dzmitry Malyshau <kvark@fastmail.com> | 2023-12-01 23:35:17 -0800 |
| commit | e4bf6914c788f02f47fd6a5f6d581df92f9c6b43 (patch) | |
| tree | ce90fe3c86c579a46514be5c1f91bab79887d1e5 /src/dynamics/solver | |
| parent | e9ea2ca10b3058a6ac2d7f4b79d351ef18ad3c06 (diff) | |
| download | rapier-e4bf6914c788f02f47fd6a5f6d581df92f9c6b43.tar.gz rapier-e4bf6914c788f02f47fd6a5f6d581df92f9c6b43.tar.bz2 rapier-e4bf6914c788f02f47fd6a5f6d581df92f9c6b43.zip | |
Fix check for motor constraints on angular DoF
Diffstat (limited to 'src/dynamics/solver')
| -rw-r--r-- | src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs b/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs index 8c83f58..de5bbe6 100644 --- a/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs +++ b/src/dynamics/solver/joint_constraint/joint_generic_velocity_constraint.rs @@ -89,7 +89,7 @@ impl JointGenericVelocityConstraint { let start = len; for i in DIM..SPATIAL_DIM { - if (motor_axes >> DIM) & (1 << i) != 0 { + if motor_axes & (1 << i) != 0 { out[len] = builder.motor_angular_generic( params, jacobians, @@ -385,7 +385,7 @@ impl JointGenericVelocityGroundConstraint { let start = len; for i in DIM..SPATIAL_DIM { - if (motor_axes >> DIM) & (1 << i) != 0 { + if motor_axes & (1 << i) != 0 { out[len] = builder.motor_angular_generic_ground( params, jacobians, |
