PhysicsMaterial¶
Inherits: Resource < Reference < Object
具有物理属性的材质。
描述¶
提供了一种修改PhysicsBody的碰撞属性的方法。
属性¶
|
||
|
||
|
||
|
属性说明¶
bool absorbent
Default |
|
Setter |
set_absorbent(value) |
Getter |
is_absorbent() |
如果true
,则从碰撞对象的弹跳性中减去弹性,而不是添加它。
float bounce
Default |
|
Setter |
set_bounce(value) |
Getter |
get_bounce() |
实体的弹性。值的范围从0
(无反弹)到1
(完全反弹)。
float friction
Default |
|
Setter |
set_friction(value) |
Getter |
get_friction() |
物体的摩擦。取值范围从0
(无摩擦)到1
(最大摩擦)。
bool rough
Default |
|
Setter |
set_rough(value) |
Getter |
is_rough() |
如果 true
,当两个物体碰撞时,物理引擎将使用标记为“粗糙”的物体的摩擦。如果 false
,物理引擎将使用所有碰撞物体的最低摩擦力来代替。如果两个碰撞的对象都为 true
,物理引擎将使用最高的摩擦力。