Version: 2018.4
LanguageEnglish
  • C#

ClothSkinningCoefficient.collisionSphereDistance

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public float collisionSphereDistance;

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 Cloth 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.0 Range: [0,inf).

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961