erincatto / box2d

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

Breaking changes in b2MouseJointDef #664

Closed ufrshubham closed 3 years ago

ufrshubham commented 3 years ago

It seems in v2.4.1, dampingRatio and frequencyHz were removed from b2MouseJointDef. Instead of those two parameters, damping and stiffness have been introduced. I think this change is not documented in breaking changes list. What changes should one make to get old behaviour with new parameters?

thegrb93 commented 3 years ago

The new freq/damping can be calculated from old values using these. https://github.com/erincatto/box2d/blob/8815e0963d2c042309ab302fadcea47034f352cb/src/dynamics/b2_joint.cpp#L40-L88

ufrshubham commented 3 years ago

The new freq/damping can be calculated from old values using these. https://github.com/erincatto/box2d/blob/8815e0963d2c042309ab302fadcea47034f352cb/src/dynamics/b2_joint.cpp#L40-L88

That worked! Thanks 🤘🏻