Remove hardcoded joint bias

Use user provided bias instead of hardcoded bias.

(cherry picked from commit 96093778ed)
This commit is contained in:
ShyRed 2019-03-27 19:21:07 +01:00 committed by Rémi Verschelde
parent 4ba90b9dda
commit d538fb8d6c
1 changed files with 1 additions and 3 deletions

View File

@ -299,9 +299,7 @@ bool GrooveJoint2DSW::setup(real_t p_step) {
Vector2 delta = (B->get_transform().get_origin() + rB) - (A->get_transform().get_origin() + rA); Vector2 delta = (B->get_transform().get_origin() + rB) - (A->get_transform().get_origin() + rA);
// FIXME: We used to do this assignment and then override it with 0.001 right after. Investigate why. real_t _b = get_bias();
//real_t _b = get_bias();
real_t _b = 0.001;
gbias = (delta * -(_b == 0 ? space->get_constraint_bias() : _b) * (1.0 / p_step)).clamped(get_max_bias()); gbias = (delta * -(_b == 0 ? space->get_constraint_bias() : _b) * (1.0 / p_step)).clamped(get_max_bias());
// apply accumulated impulse // apply accumulated impulse