Skip to content

PhysicMaterial

继承自 AssetObject

PhysicMaterial类描述了如何处理碰撞的物体(摩擦、弹跳)。

可以通过以下方式获取PhysicMaterial对象:

复制资源ID:

根据资源ID加载PhysicMaterial资源:

typeScript
let obj = new GameObject();
let animation = obj.AddComponent<Animation>(Animation);
let uuid = "BE9A9E258BF04E5D0F9B5331E8024585";
let asset = Resources.Load<PhysicMaterial>(PhysicMaterial, uuid);

成员变量

PhysicMaterial.bounciness : number
物理材质的表面弹性系数。
PhysicMaterial.dynamicFriction : number
物理材质的动态摩擦力。
PhysicMaterial.staticFriction : number
物理材质静态摩擦力。
PhysicMaterial.frictionCombine : PhysicMaterialCombine
物体之间的摩擦力的组合方式。
PhysicMaterial.bounceCombine : PhysicMaterialCombine
物体之间的弹性碰撞力的组合方式。

成员方法

PhysicMaterial.ructor ( handle : IntPtr? ) : ructor(IntPtr?