InteractiveCloth.attachmentTearFactor Manual     Reference     Scripting  
Scripting > Runtime Classes > InteractiveCloth
InteractiveCloth.attachmentTearFactor

var attachmentTearFactor : float

Description

How far attached rigid bodies need to be stretched, before they will tear off.

Must be larger then zero. Larger values make the cloth stretch further without tearing. Only has an affect for rigid bodies which have been attached with the tearable parameter set.

See Also: AttachToCollider function.

JavaScripts
transform.GetComponent(InteractiveCloth).attachmentTearFactor = 10;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Awake() {
transform.GetComponent<InteractiveCloth>().attachmentTearFactor = 10;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Awake():
transform.GetComponent[of InteractiveCloth]().attachmentTearFactor = 10