Fix mass property update when adding a collider.
This commit is contained in:
@@ -150,6 +150,7 @@ impl Collider {
|
||||
}
|
||||
|
||||
/// The position of this collider expressed in the local-space of the rigid-body it is attached to.
|
||||
#[deprecated(note = "use `.position_wrt_parent()` instead.")]
|
||||
pub fn delta(&self) -> &Isometry<f32> {
|
||||
&self.delta
|
||||
}
|
||||
|
||||
@@ -360,8 +360,8 @@ impl ContactManifold {
|
||||
pair,
|
||||
(subshape1, subshape2),
|
||||
BodyPair::new(coll1.parent, coll2.parent),
|
||||
*coll1.delta(),
|
||||
*coll2.delta(),
|
||||
*coll1.position_wrt_parent(),
|
||||
*coll2.position_wrt_parent(),
|
||||
(coll1.friction + coll2.friction) * 0.5,
|
||||
(coll1.restitution + coll2.restitution) * 0.5,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user