Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


maxDistance

Distance a vertex is allowed to travel from the skinned mesh vertex position.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.ClothModule
public float maxDistance

Remarks

The Cloth component makes sure that the cloth vertices stay within maxDistance from the skinned mesh vertex positions. If maxDistance is zero, the vertex is not simulated but set to the skinned mesh vertex position. This behavior is useful for attaching the cloth vertex to the skin of an animated character. Default: 0.2 Range: [0, inf).