HingeJoint2D Component interprets angle values in radians instead of degrees

Hi, I’ve just encountered this issue. Inside the editor (Cocos Creator v3.4) the values of LowerAngle and UpperAngle properties of a HingeJoint2D component are interpreted as if they are in radians but I think they should be in degrees.

I can ask engineering to have a look.

In the code they are angles.

But the editor accepts values in radians. If I set LowerAngle to 30 degrees it doesn’t work but If I give it the equivalent radian value (0.52) it works correctly. Since the editor is closed source I can’t pinpoint exactly where this issue is coming from.

Actually, you are right, what is needed in box2d is a radian value. The reason for this problem is that the angle to radian calculation is missing here. You can modify it and customize the engine to solve your problem. We will fix it in a subsequent version.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.