HingeJoint2D concerns

Hi folks,
I’ve been playing a lot with serveral HingeJoint2D in a very complex configuration of rigidBodies. I’ve noticed a couple things…

  1. The default value of MaxTorque is 10,000. If Limits are set on the joint, and the Motor is turned on with a non-zero value… then once the joint reaches one of the limits, it gets stuck. Setting the Motor to an opposite value in order to rotate the joint in the opposite direction in order to move away from that limit, results in nothing happening. The joint is simply stuck at that limit. It is almost as though the Torque served to ram the body into the limit, and permanently lodge it there. Nevertheless, setting the MaxTorque to a much smaller value, like in the range 15-50, prevents any of the above from occurring, and everything works fine.

2)It would be great if HingeJoint2D made available the “getJointAngle” method that box2d already supplies for this kind of joint. Currently in Unity 2D there is no way to access the relative angle of the joint. Interestingly Unity 3D does supply something similar to getJointAngle for the 3D HingeJoint… the variable is simply called “angle”. The reason why this method would be useful in the HingeJoint2D is that I could then throttle the MaxTorque value at run time… I could initially have a large value of torque, but then if I detect that the joint is nearing the limit angle, I could then ease off of the MaxTorque, so that the joint doesn’t get stuck at the limit.

TL;DR - I’ve identified a problem in bullet #1, and I’m requesting a feature in bullet #2 :wink:

Lots of accessors (for both joints and rigid-body) have been added already but they were not part of the critical updates to 4.3 and will be in a near future release.

Thank you very much!