Cloth timeScale

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.

bump

At least you got errors, mine just crashes…so I’ll give you a free bump

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.

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;

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?

2013… Still same issue. Did anyone manage to solve it? Did anyone hear anything from unity about this?

I opened a request for it in feedback. If you’re still suffering from this and want to see it fixed, vote here: http://feedback.unity3d.com/suggestions/fix-bug-with-interactive-cloth-when-you-set-time-dot-timescale-to-0

I’m running into this right now, and have no cloth…

    public static void disableAllCloth() {
        InteractiveCloth[] clothing = FindObjectsOfType(typeof(InteractiveCloth)) as InteractiveCloth[];
        foreach (InteractiveCloth clothe in clothing) {
            clothe.enabled = false;
        }
    }

    public static void enableAllCloth() {
        InteractiveCloth[] clothing = FindObjectsOfType(typeof(InteractiveCloth)) as InteractiveCloth[];
        foreach (InteractiveCloth clothe in clothing) {
            clothe.enabled = true;
        }
    }

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.

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.

var hits = Physics.SphereCastAll(shootTransform.position,
                                 shootSphereCastRadius,
                                 direction,
                                 direction.magnitude);
            
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…

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

I’m getting it too… so i guess Unity isn’t fixing this one eh?