ClothSphereColliderPair

struct in UnityEngine

切换到手册

描述

一对 SphereCollider,用于定义要碰撞的 Cloth 对象的形状。

ClothSphereColliderPair 可包含一个有效的 SphereCollider 实例(第二个为 null)或者一对 SphereCollider。在前一种情况下,ClothSphereColliderPair 仅表示要碰撞的 Cloth 的单个 SphereCollider。在后一种情况下,它表示由两个球体定义的圆锥形胶囊形状,以及连接这两个球体的锥体。圆锥形胶囊形状在对角色的四肢进行建模时非常有用。

选择 Cloth 对象,以便在 Scene 视图中查看 Cloth 碰撞体形状的可视化效果。

变量

firstClothSphereColliderPair 的第一个 SphereCollider。
secondClothSphereColliderPair 的第二个 SphereCollider。

构造函数

ClothSphereColliderPair创建一个 ClothSphereColliderPair。如果只提供一个 SphereCollider,则 ClothSphereColliderPair 将定义一个简单球体。如果提供两个 SphereCollider,则 ClothSphereColliderPair 定义一个圆锥形胶囊形状,该形状由两个球体和连接这两个球体的锥体组成。

Did you find this page useful? Please give it a rating: