Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cloth timeScale

Discussion in 'Editor & General Support' started by malyna, Oct 7, 2010.

  1. malyna

    malyna

    Joined:
    Jul 9, 2010
    Posts:
    105
    Hi,
    When I pause my game, which means setting timeScale = 0, and then unpause i get some errors:

    !slot->GetLocalAABB().IsValid()
    !IsFinite(outDistanceForSort)
    !IsFinite(outDistanceAlongView)

    It is happening only if i have Cloth (gameobject with cloth renderer and interactive cloth components) in my scene.

    Thx for help.
     
  2. malyna

    malyna

    Joined:
    Jul 9, 2010
    Posts:
    105
    bump
     
  3. lord_sarcasmo

    lord_sarcasmo

    Joined:
    May 25, 2010
    Posts:
    2
    At least you got errors, mine just crashes.....so I'll give you a free bump
     
  4. Vicenti

    Vicenti

    Joined:
    Feb 10, 2010
    Posts:
    664
    Sounds like a bug, rather than something that can be fixed.

    You might try setting timeScale = 0.0001 instead, though that could possibly introduce its own problems it should work until a more appropriate solution presents itself.
     
  5. quetzal

    quetzal

    Joined:
    May 29, 2010
    Posts:
    1
    I had the same problem and I solve it very easy with:

    var bandera : GameObject;

    if( global.PAUSA == true ){
    if( bandera.GetComponent(InteractiveCloth).enabled == true )
    bandera.GetComponent(InteractiveCloth).enabled = false;
     
  6. gus512

    gus512

    Joined:
    Jan 18, 2012
    Posts:
    5
    I'm getting the same errors.
    A lot of
    !IsFinite(outDistanceForSort)
    !IsFinite(outDistanceAlongView)

    errors.

    Console displays it as an error in Assert in file: C:/BuilderAgent/work/.../EditorGUIUtility.cs at line : 330

    My scene has an InteractiveCloth, and the whole engine freezes when i pause the game (set TimeScale to 0) and display some GUI. After a while, it turns responsive again and the errors show up.

    Any clues?
     
  7. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    2013... Still same issue. Did anyone manage to solve it? Did anyone hear anything from unity about this?
     
  8. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
  9. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,616
    I'm running into this right now, and have no cloth...
     
  10. Deleted User

    Deleted User

    Guest

    Code (CSharp):
    1.  
    2.     public static void disableAllCloth() {
    3.         InteractiveCloth[] clothing = FindObjectsOfType(typeof(InteractiveCloth)) as InteractiveCloth[];
    4.         foreach (InteractiveCloth clothe in clothing) {
    5.             clothe.enabled = false;
    6.         }
    7.     }
    8.  
    9.     public static void enableAllCloth() {
    10.         InteractiveCloth[] clothing = FindObjectsOfType(typeof(InteractiveCloth)) as InteractiveCloth[];
    11.         foreach (InteractiveCloth clothe in clothing) {
    12.             clothe.enabled = true;
    13.         }
    14.     }
    15.  
    I was running into this issue, so I wrote these two little methods (could easily be combined into one.) Consider the code licensed as public domain/CC0 so use it however you see fit.
     
  11. ForceMagic

    ForceMagic

    Joined:
    Feb 27, 2015
    Posts:
    38
    I just updated to the latest version of Unituy and I'm getting the same error on Unity 5.3.1p3. Same as angrypenguin I have nothing related to InteractiveCloth.

    I suspect this is coming from a Array.Sort that I'm performing on the result of a SphereCastAll, but since there is no call stack it doesn't help much.

    Code (csharp):
    1. var hits = Physics.SphereCastAll(shootTransform.position,
    2.                                  shootSphereCastRadius,
    3.                                  direction,
    4.                                  direction.magnitude);
    5.            
    6. Array.Sort(hits, (x, y) => x.distance.CompareTo(y.distance));
    EDIT: Just manage to repro the error even though if the Array.Sort line was commented out. So it's clearly not that, but it's Clear that this error is Useless for helping me understand what's wrong...
     
    Last edited: Jan 20, 2016
  12. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    yep, I'm getting it in an old 2d project that I've just started reworking in this version:

    Version 5.3.1f1 (cc9cbbcc37b4) Personal
    Thu, 17 Dec 2015 13:01:19 GMT
    Branch: 5.3/release


    I have no cloth objects either
     
  13. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    I'm getting it too.. so i guess Unity isn't fixing this one eh?