diff --git a/unity/Runtime/Components/Joints/MjBallJoint.cs b/unity/Runtime/Components/Joints/MjBallJoint.cs index 1eca35ab29..3c9a7547d4 100644 --- a/unity/Runtime/Components/Joints/MjBallJoint.cs +++ b/unity/Runtime/Components/Joints/MjBallJoint.cs @@ -34,7 +34,13 @@ protected override void OnParseMjcf(XmlElement mjcf) { Settings.FromMjcf(mjcf); var rangeValues = mjcf.GetFloatArrayAttribute("range", defaultValue: new float[] { 0, 0 }); // rangeValues[0] is always 0 for ball joints. + RangeUpper = rangeValues[1]; + + if (!MjSceneImportSettings.AnglesInDegrees){ + RangeUpper *= Mathf.Rad2Deg; + } + } protected override XmlElement OnGenerateMjcf(XmlDocument doc) {