diff options
Diffstat (limited to 'servers/physics_3d/joints/pin_joint_3d_sw.cpp')
-rw-r--r-- | servers/physics_3d/joints/pin_joint_3d_sw.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/servers/physics_3d/joints/pin_joint_3d_sw.cpp b/servers/physics_3d/joints/pin_joint_3d_sw.cpp index 3f3c0f367d..230904408b 100644 --- a/servers/physics_3d/joints/pin_joint_3d_sw.cpp +++ b/servers/physics_3d/joints/pin_joint_3d_sw.cpp @@ -109,10 +109,12 @@ void PinJoint3DSW::solve(real_t p_step) { real_t impulseClamp = m_impulseClamp; if (impulseClamp > 0) { - if (impulse < -impulseClamp) + if (impulse < -impulseClamp) { impulse = -impulseClamp; - if (impulse > impulseClamp) + } + if (impulse > impulseClamp) { impulse = impulseClamp; + } } m_appliedImpulse += impulse; |