Removed unnecessary assignments

This commit is contained in:
Wilson E. Alvarez
2017-08-21 15:15:36 -04:00
parent 4717d37bfa
commit 738d2ab969
37 changed files with 65 additions and 128 deletions
+4 -2
View File
@@ -408,8 +408,10 @@ bool GrooveJoint2DSW::setup(real_t p_step) {
//joint->bias = cpvclamp(cpvmult(delta, -joint->constraint.biasCoef*dt_inv), joint->constraint.maxBias);
Vector2 delta = (B->get_transform().get_origin() + rB) - (A->get_transform().get_origin() + rA);
real_t _b = get_bias();
_b = 0.001;
// 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 = 0.001;
gbias = (delta * -(_b == 0 ? space->get_constraint_bias() : _b) * (1.0 / p_step)).clamped(get_max_bias());
// apply accumulated impulse