Select your preferred scripting language. All code snippets will be displayed in this language.
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseHow 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.transform.GetComponent(InteractiveCloth).attachmentTearFactor = 10;
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { transform.GetComponent<InteractiveCloth>().attachmentTearFactor = 10; } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Example() as void: transform.GetComponent[of InteractiveCloth]().attachmentTearFactor = 10