Fixed 2D physics regression that causes RigidBody2D nodes to spin uncontrollably when colliding

This commit is contained in:
TwistedTwigleg 2020-08-28 14:16:12 -04:00
parent d6510776dc
commit 0205eef96b
1 changed files with 2 additions and 2 deletions

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;