Search Unity

Cloth Constraints not working - can't paint or select

Discussion in 'Physics' started by indieDoroid, Jul 26, 2019.

  1. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Hi @MelvMay
    After updating to 2018.4.4 cloth seems to have screwed up. I noticed my physics cloth objects were flying all over the place, after closer inspection it appears the cloth constraints were missing.

    Problem I have now is I can't paint anything.. the latest version of 2018 seems to have done something to cloth.

    Attached is a screenshot showing the issue

    Anyone have tips ?

    *UPDATE1*
    I ended up deleting my entire cloth and started from scratch, after that I was able to get the cloth constraints to show up.... So yea.. Just delete your old work and restart. That worked for me.

    *UPDATE2*
    If I try to attach this new cloth to my character, the transform coordinates of the character completely offsets the cloth "Bounds", moving the cloth object into some other space.. This didn't happen to me before updating to 2018.4.4 .. so beware guys.

    I tried to parent this object to other parts of the body, even not make it a child of the character game object. Nothing worked, the bounds just inherit transform values based off something. I'm not sure .. sucks that cloth is broken.
     

    Attached Files:

    Last edited: Jul 26, 2019
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,839
    I am a 2D physics dev and I don't work on 3D cloth. Maybe @SeanParkinson can help?
     
    Last edited: Jul 28, 2019
  3. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Ok got it thanks!

    I ended up copying a cloth gameobject that WAS working and replaced the wonky ones.. it seems ok for now? But it seems like a really hacky way to do it ... hopefully someone at Unity is still working on the cloth systems?
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,839
    Yes, it's certainly being worked on. Sean above is the person to help.
     
  5. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Great to hear thank you. Looking forward to the updates from @SeanParkinson ! ;)
     
  6. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,839
    You're welcome.
     
  7. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Hi @SeanParkinson cc @MelvMay

    I'm also running into this weird problem with the cloth disappearing. Please check out the clip below with settings. Do you know what's causing this?

    I wasn't having this problem prior to updating to 2018.4.5f1


    Thanks
     

    Attached Files:

  8. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,839
    Again, I know nothing about cloth, sorry.
     
  9. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Haha ok sorry. I won't CC you anymore
     
  10. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    13
    Hi indieDoroid,

    Apologies for the late reply, I will look into these issues right away.
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,557
    We had the same issue in 2018.4.4 where we couldn't paint cloth vertices - selection seemed to work though.

    We fixed it by writing a script that recreated the hidden collider mesh - baked it from the SkinnedMeshRenderer. It seems that somehow the collider was in another part of the scene, so the raycasting for painting didn't work on it.

    I see in Unity 2019 this issue is solved - they've changed how the cloth collider/painting works and it's a lot better. Cloth sim seems slower in 2019 though, so we're still on 2018.4.4 for now.

    We also wrote a script to allow you to set the size of the spheres rendered for constraint painting as in our case they were way too big and there was no option to change this size. (Reflection FTW).

    Hope this helps solve it.
     
  12. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    Hi Sean,

    Thanks for getting back to us on it.

    I also seem to have run into some performance spikes with the physics cloth. Please find an attached screenshot.

    I'll do more tests to see how I can recreate it.
     

    Attached Files:

  13. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    13
    Hi,

    A fix for the bounds issue has just landed in 2018.

    A fix for flying cloth is about to land.

    Do you have a repro for the missing constraints issue that you can share, please?

    Thanks!
     
    AndrewRH likes this.
  14. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
  15. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    13
    Hi Clive,

    This issue has just been fixed. It should make it to a release soon.
     
  16. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
    Got it. Thought that it was already released
     
  17. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    171
    @SeanParkinson this is awesome! Thanks for supporting the cloth physics! Can't wait to update and test it out! Hope it solves my flickering cloth issue too :)
     
  18. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
    Updated to Unity 2018.4.7f1. Issue is still there. Hope it will be fixed in next version.