ClothSkinningCoefficient.collisionSphereDistance 碰撞球体距离

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

这两个(collisionSphereRadius, collisionSphereDistance) 定义每个布料顶点的一个球体。该球体的中心是位于位置 constrainPosition - constrainNormal * (collisionSphereRadius + collisionSphereDistance) 并且它的半径是collisionSphereRadius,其中constrainPosition和constrainNormal是顶点位置和由SkinnedMeshRenderer生成的法线。SkinnedCloth确保布料顶点不进入这个球体。作为一个典型的用例,设置collisionSphereDistance为0和collisionSphereRadius一个大值 w.r.t.。t是三角形大小。在这个设置,布料反向碰撞蒙皮网格。默认:0.5 范围:[0,inf]

最后修改:2011年1月8日 Saturday 13:30

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。