erincatto / box2d

Box2D is a 2D physics engine for games
https://box2d.org
MIT License
8.05k stars 1.51k forks source link

Adjusting Frequency Hertz will weld joints improperly #688

Closed KylinLove closed 2 years ago

KylinLove commented 3 years ago

Hello, During the process of using Box2D, I found some weird phenomena when welding joints adjusted FrequencyHertz. Could you please confirm whether it is a bug? This is the key code to test the code. When you adjust the number to 20~30, something weird happens。

m_hertz = 10.0f; // change to 20.0f~30.0f

The test file is as follows:

weld_joint.cpp.txt

appreciated if any help!

erincatto commented 2 years ago

Use b2AngularStiffness for rotational stiffness.