From e41fccb9fb0069c8083f34b488f35242e453307e Mon Sep 17 00:00:00 2001 From: Turki Jamaan <22967219+tjamaan@users.noreply.github.com> Date: Sat, 8 Jan 2022 20:04:22 +0300 Subject: fix the parameter used for local center of mass --- src/pipeline/physics_pipeline.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index 4ba8bfa..89113a8 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -462,7 +462,7 @@ impl PhysicsPipeline { &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)); } -- cgit From 367fc3405f5b43af90527c9710a47b8b88185001 Mon Sep 17 00:00:00 2001 From: Turki Jamaan <22967219+tjamaan@users.noreply.github.com> Date: Sat, 8 Jan 2022 21:37:13 +0300 Subject: remove unnecessary comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Crozet --- src/pipeline/physics_pipeline.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index 89113a8..440e9af 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -460,8 +460,6 @@ 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_mprops.local_mprops.local_com, ); bodies.set_internal(handle.0, RigidBodyPosition::from(new_pos)); -- cgit