InteractiveCloth.AttachToColliderfunction AttachToCollider (collider : Collider, tearable : boolean = false, twoWayInteraction : boolean = false) : voidDescriptionAttaches a collider to the cloth object. Only has an effect if some vertices of the cloth are intersecting the collider. These vertices will then become static in their position with respect to the collider. If tearable is true, attachments can tear of, depending on the value of attachmentTearFactor. If twoWayInteraction is true, the cloth will apply forces back to the attached rigidbody, depending on the value of attachmentResponse. See Also: DetachFromCollider function.
JavaScript
// Attach this transform's collider to a cloth, make using UnityEngine; import UnityEngine |
