Search Unity

breakForce and infinity not doing what doc states

Discussion in 'Documentation' started by SillyMe, Nov 12, 2016.

  1. SillyMe

    SillyMe

    Joined:
    Nov 12, 2013
    Posts:
    6
    The documentation at: https://docs.unity3d.com/ScriptReference/Joint-breakForce.html

    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)"

    Why?!
     
    juanitogan likes this.
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,288
    I'll get this passed onto the docs team. Not totally sure this is an obvious issue. (At least to me!)
     
    juanitogan likes this.
  3. SillyMe

    SillyMe

    Joined:
    Nov 12, 2013
    Posts:
    6
    It's been over 5 weeks now. Any news what the status is?

    I have no clue what I should do about the error message.

    Peter
     
  4. hsallander

    hsallander

    Joined:
    Dec 19, 2013
    Posts:
    20
    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.
     
    karmington2 likes this.
  5. mliukka

    mliukka

    Joined:
    Nov 1, 2015
    Posts:
    19
    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?
     
    karmington2 likes this.
  6. maclark86

    maclark86

    Joined:
    Jan 21, 2016
    Posts:
    6
    same error. any update? setting the break force to really really high will probably be just fine for my purposes tho.
     
    karmington2 likes this.
  7. juanitogan

    juanitogan

    Joined:
    Aug 18, 2017
    Posts:
    25
    Any updated on this??? Still not working in 2017.4.