Merge pull request #41584 from TwistedTwigleg/Godot_Physics_2D_Regression_Fix

Godot master 2D Physics Regression fix
This commit is contained in:
Rémi Verschelde 2020-08-29 12:51:26 +02:00 committed by GitHub
commit edac127f91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -478,8 +478,8 @@ void BodyPair2DSW::solve(real_t p_step) {
Vector2 jb = c.normal * (c.acc_bias_impulse - jbnOld);
A->apply_bias_impulse(c.rA, -jb);
B->apply_bias_impulse(c.rB, jb);
A->apply_bias_impulse(-jb, c.rA);
B->apply_bias_impulse(jb, c.rB);
real_t jn = -(c.bounce + vn) * c.mass_normal;
real_t jnOld = c.acc_normal_impulse;