diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-01-09 22:15:36 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2022-01-09 22:15:36 +0100 |
| commit | b631fe9193a2e769e5ca1c5c8c4ac9843da870ac (patch) | |
| tree | 8682f0870149b8ef6f741dccf0a96e2a26966c8c /src/dynamics/solver/velocity_solver.rs | |
| parent | 2bfceadf0672572a360af33cf4a78cb42488e684 (diff) | |
| download | rapier-b631fe9193a2e769e5ca1c5c8c4ac9843da870ac.tar.gz rapier-b631fe9193a2e769e5ca1c5c8c4ac9843da870ac.tar.bz2 rapier-b631fe9193a2e769e5ca1c5c8c4ac9843da870ac.zip | |
Allow locking individual translational axes
Diffstat (limited to 'src/dynamics/solver/velocity_solver.rs')
| -rw-r--r-- | src/dynamics/solver/velocity_solver.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynamics/solver/velocity_solver.rs b/src/dynamics/solver/velocity_solver.rs index ed1fe3a..91b6be9 100644 --- a/src/dynamics/solver/velocity_solver.rs +++ b/src/dynamics/solver/velocity_solver.rs @@ -67,7 +67,7 @@ impl VelocitySolver { // NOTE: `dvel.angular` is actually storing angular velocity delta multiplied // by the square root of the inertia tensor: dvel.angular += mprops.effective_world_inv_inertia_sqrt * forces.torque * params.dt; - dvel.linear += forces.force * (mprops.effective_inv_mass * params.dt); + dvel.linear += forces.force.component_mul(&mprops.effective_inv_mass) * params.dt; } for (_, multibody) in multibodies.multibodies.iter_mut() { |
