aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-01-10 11:38:43 -0800
committerGitHub <noreply@github.com>2022-01-10 11:38:43 -0800
commit0ccd15c4b1f57d6c85a1727a55ed991c835690f5 (patch)
treec1e8804e870289f8416f49383f8588974e12f447 /src
parent2bfceadf0672572a360af33cf4a78cb42488e684 (diff)
parent367fc3405f5b43af90527c9710a47b8b88185001 (diff)
downloadrapier-0ccd15c4b1f57d6c85a1727a55ed991c835690f5.tar.gz
rapier-0ccd15c4b1f57d6c85a1727a55ed991c835690f5.tar.bz2
rapier-0ccd15c4b1f57d6c85a1727a55ed991c835690f5.zip
Merge pull request #270 from tjamaan/fix_RigidBodyVelocity_rotation_center
fix the parameter used for local center of mass
Diffstat (limited to 'src')
-rw-r--r--src/pipeline/physics_pipeline.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs
index 125b144..0f3235e 100644
--- a/src/pipeline/physics_pipeline.rs
+++ b/src/pipeline/physics_pipeline.rs
@@ -426,9 +426,7 @@ impl PhysicsPipeline {
let new_pos = rb_vel.integrate(
integration_parameters.dt,
&rb_pos.position,
- // NOTE: we don't use the `world_com` here because it is not
- // really updated for kinematic bodies.
- &(rb_pos.position * rb_mprops.local_mprops.local_com),
+ &rb_mprops.local_mprops.local_com,
);
bodies.set_internal(handle.0, RigidBodyPosition::from(new_pos));
}