- Home /
 
               Question by 
               diabolott · Nov 28, 2017 at 07:41 PM · 
                c#unity 5clothconstraints  
              
 
              C# Set cloth vertices unconstrained ?
The code below sets maxDistance for cloth vertices, but how to set them unconstrained?
 Cloth cloth = cape.GetComponent<Cloth>();
 ClothSkinningCoefficient[] newConstraints;
 newConstraints = cloth.coefficients;
 
 for (int i=0; i<newConstraints.Length; i++){
      newConstraints[i].maxDistance=10f;
 }
 cloth.coefficients = newConstraints;
               Comment
              
 
               
              Answer by Cowboy_Jow · Apr 25, 2019 at 02:15 AM
https://answers.unity.com/questions/1451791/can-add-a-constraint-to-a-cloth-at-runtime-but-can.html
based on this, it appears to "float.MaxValue"
I have tested it, it works
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                