Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ClothSkinningCoefficient.collisionSphereRadius

var collisionSphereRadius: float;
float collisionSphereRadius;
collisionSphereRadius as float

Description

Definition of a sphere a vertex is not allowed to enter. This allows collision against the animated cloth.

The pair (collisionSphereRadius, collisionSphereDistance) define a sphere for each cloth vertex. The sphere's center is located at the position constrainPosition - constrainNormal * (collisionSphereRadius + collisionSphereDistance) and its radius is collisionSphereRadius, where constrainPosition and constrainNormal are the vertex positions and normals generated by the SkinnedMeshRenderer. The SkinnedCloth makes sure that the cloth vertex does not enter this sphere. As a typical usecase, set collisionSphereDistance to zero and collisionSphereRadius to a large value w.r.t. the triangle size. In this setup, the cloth collides against the skinned mesh. Default: 0.5 Range: [0,inf).