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

function DetachFromCollider (collider : Collider) : void

Description

Detaches a collider from the cloth object.

See Also: AttachToCollider function.

JavaScript
// Delete a collider that is attached to this transform's cloth
// by searching for its name.

var colliderName = "GameObject collider";
function Start() {
var colliderToRemove : Collider = GameObject.Find(colliderName) as Collider;
transform.GetComponent(InteractiveCloth).DetachFromCollider(colliderToRemove);
}