Fix - AngleJoint

3 views
Skip to first unread message

Bobby5808

unread,
Aug 18, 2009, 7:21:06 PM8/18/09
to Physics2D.Net
Hi Jono

I had a problem with the AngleJoint, it would jump violently around
when the angle was near PI, and I fixed it by changing this line:

Scalar difference = MathHelper.ClampAngle(body1.State.Position.Angular
- body2.State.Position.Angular) - angle;

to this:

Scalar difference = MathHelper.ClampAngle(body1.State.Position.Angular
- body2.State.Position.Angular - angle);

Also, should I rather post this under issues, or is it fine putting it
in discussions?

Thanks
Reply all
Reply to author
Forward
0 new messages