diff options
Diffstat (limited to 'servers/physics_2d/godot_joints_2d.cpp')
-rw-r--r-- | servers/physics_2d/godot_joints_2d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics_2d/godot_joints_2d.cpp b/servers/physics_2d/godot_joints_2d.cpp index 0c21b08ea9..34eb66500d 100644 --- a/servers/physics_2d/godot_joints_2d.cpp +++ b/servers/physics_2d/godot_joints_2d.cpp @@ -436,13 +436,13 @@ void GodotDampedSpringJoint2D::solve(real_t p_step) { // not 100% certain this is derived correctly, though it makes sense real_t v_damp = -vrn * v_coef; target_vrn = vrn + v_damp; - Vector2 j = n * v_damp * n_mass; + Vector2 j_new = n * v_damp * n_mass; if (dynamic_A) { - A->apply_impulse(-j, rA); + A->apply_impulse(-j_new, rA); } if (dynamic_B) { - B->apply_impulse(j, rB); + B->apply_impulse(j_new, rB); } } |