Merge pull request #270 from tjamaan/fix_RigidBodyVelocity_rotation_center

fix the parameter used for local center of mass
This commit is contained in:
Sébastien Crozet
2022-01-10 11:38:43 -08:00
committed by GitHub

View File

@@ -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));
}