Rotation locking: apply filter only to the world inertia properties to fix the multi-collider case.
This commit is contained in:
@@ -21,10 +21,10 @@ pub(crate) struct FixedPositionConstraint {
|
||||
|
||||
impl FixedPositionConstraint {
|
||||
pub fn from_params(rb1: &RigidBody, rb2: &RigidBody, cparams: &FixedJoint) -> Self {
|
||||
let ii1 = rb1.world_inv_inertia_sqrt.squared();
|
||||
let ii2 = rb2.world_inv_inertia_sqrt.squared();
|
||||
let im1 = rb1.mass_properties.inv_mass;
|
||||
let im2 = rb2.mass_properties.inv_mass;
|
||||
let ii1 = rb1.effective_world_inv_inertia_sqrt.squared();
|
||||
let ii2 = rb2.effective_world_inv_inertia_sqrt.squared();
|
||||
let im1 = rb1.effective_inv_mass;
|
||||
let im2 = rb2.effective_inv_mass;
|
||||
let lin_inv_lhs = 1.0 / (im1 + im2);
|
||||
let ang_inv_lhs = (ii1 + ii2).inverse();
|
||||
|
||||
@@ -111,8 +111,8 @@ impl FixedPositionGroundConstraint {
|
||||
anchor1,
|
||||
local_anchor2,
|
||||
position2: rb2.active_set_offset,
|
||||
im2: rb2.mass_properties.inv_mass,
|
||||
ii2: rb2.world_inv_inertia_sqrt.squared(),
|
||||
im2: rb2.effective_inv_mass,
|
||||
ii2: rb2.effective_world_inv_inertia_sqrt.squared(),
|
||||
local_com2: rb2.mass_properties.local_com,
|
||||
impulse: 0.0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user