Merge pull request #270 from tjamaan/fix_RigidBodyVelocity_rotation_center
fix the parameter used for local center of mass
This commit is contained in:
@@ -426,9 +426,7 @@ impl PhysicsPipeline {
|
|||||||
let new_pos = rb_vel.integrate(
|
let new_pos = rb_vel.integrate(
|
||||||
integration_parameters.dt,
|
integration_parameters.dt,
|
||||||
&rb_pos.position,
|
&rb_pos.position,
|
||||||
// NOTE: we don't use the `world_com` here because it is not
|
&rb_mprops.local_mprops.local_com,
|
||||||
// really updated for kinematic bodies.
|
|
||||||
&(rb_pos.position * rb_mprops.local_mprops.local_com),
|
|
||||||
);
|
);
|
||||||
bodies.set_internal(handle.0, RigidBodyPosition::from(new_pos));
|
bodies.set_internal(handle.0, RigidBodyPosition::from(new_pos));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user