How to solve the problem of adding constraints that move randomly

Standard physical environment, two sticks, positioned, a hinge constraint.
As soon as I call add constraint, the two sticks move randomly after combining.
It is possible to call setXxxVelocity to stop the movement, but it needs to be in the next frame.
Is there any way to solve this problem in the current frame?

How about setting inertia to 0?

mesh.physicsBody.setMassProperties({
                inertia: new Vector3(0, 0, 0)
              });
3 Likes

Thank you very much. It works.