states that "The break force can be set to Mathf.Infinity to render the joint unbreakable. ",
but if I do exactly as the documentation states: hinge.breakForce = Mathf.Infinity;
then I get the following error:
“Joint2D.breakForce assign attempt for ‘Capsule’ is not valid. Input breakForce is { Infinity }.
UnityEngine.Joint2D:set_breakForce(Single)”
Any update on this? I’m having the same problem. How can we set the breakforce to Infinity if not via Mathf.Infinity? Even if I copy the current value (which is correctly set to Infinity in the Inspector) and then set it later back to that later in the code I get the same error, eg I cannot set it to a value it had previously.
This is still not solved apparently. Getting the same error about assign attempt not being valid. Does anyone know a working way (in C#) to set joint break force and torque to infinity?