Rotation locking: apply filter only to the world inertia properties to fix the multi-collider case.

This commit is contained in:
Crozet Sébastien
2021-01-21 14:58:40 +01:00
parent d69b5876f3
commit 8f330b2a00
25 changed files with 232 additions and 244 deletions

View File

@@ -60,7 +60,9 @@ impl VelocitySolver {
bodies.foreach_active_island_body_mut_internal(island_id, |_, rb| {
let dvel = self.mj_lambdas[rb.active_set_offset];
rb.linvel += dvel.linear;
rb.angvel += rb.world_inv_inertia_sqrt.transform_vector(dvel.angular);
rb.angvel += rb
.effective_world_inv_inertia_sqrt
.transform_vector(dvel.angular);
});
// Write impulses back into the manifold structures.