public ClothConstraint(ClothPoint p1, ClothPoint p2, float restLength, SpringType type) { this.p1 = p1; this.p2 = p2; this.restLength = restLength; this.type = type; }
public ClothPointAttachment(ClothPoint p, Transform parentTransform) { point = p; parent = parentTransform; bindPosition = parent.InverseTransformPoint(p.position); }
public ClothLink(ClothPoint a, ClothPoint b) { A = a; B = b; restDist = Vector3.Distance(A.position, B.position); }