Closed wnbittle closed 3 years ago
I noticed a couple of other issues based on the PR to fix #634:
1. b2_revolute_joint.cpp GetReactionTorque has the wrong sign
- return inv_dt * (m_lowerImpulse + m_upperImpulse); + return inv_dt * (m_lowerImpulse - m_upperImpulse);
2. b2_prismatic_joint.cpp GetReactionForce has the wrong sign
- return inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_lowerImpulse + m_upperImpulse) * m_axis); + return inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_lowerImpulse - m_upperImpulse) * m_axis);
3. b2_distance_joint.cpp GetReactionForce isn't including the limit impulse
- b2Vec2 F = (inv_dt * m_impulse) * m_u; + b2Vec2 F = (inv_dt * m_impulse + m_lowerImpulse - m_upperImpulse) * m_u;
This PR? https://github.com/erincatto/box2d/pull/641
Fixed in #653
I noticed a couple of other issues based on the PR to fix #634:
1. b2_revolute_joint.cpp GetReactionTorque has the wrong sign
2. b2_prismatic_joint.cpp GetReactionForce has the wrong sign
3. b2_distance_joint.cpp GetReactionForce isn't including the limit impulse