Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
PhysicsMaterial
繼承: Resource < RefCounted < Object
存放與表面的物理相關的屬性,也就是粗糙度和反彈度。
說明
存放與表面的物理相關的屬性,也就是粗糙度和反彈度。這個類用於將這些屬性套用至物理體。
屬性
|
||
|
||
|
||
|
屬性說明
如果為 true,則從碰撞對象的彈跳性中減去彈性,而不是新增它。
形體的反彈值。取值範圍從 0(無反彈)到 1(完全反彈)。
注意:由於線性與角度阻尼的影響,即使將 bounce 設爲 1.0,隨時間推移仍會損失部分能量。若要讓物理形體隨時間推移仍完全保有其能量,請將 bounce 設爲 1.0、形體的線性阻尼模式設爲 Replace(如果可用的話)、線性阻尼設爲 0.0、角度阻尼模式設爲 Replace(如果可用的話),並將角度阻尼設爲 0.0。
形體的摩擦值。取值範圍從 0(無摩擦)到 1(最大摩擦值)。
若爲 true,當兩個物件碰撞時,物理引擎將採用開啟「Rough」之物件的摩擦值;若爲 false,物理引擎則會採用所有碰撞物件中最小的摩擦值;若兩個碰撞物件皆爲 true,物理引擎會採用最大的摩擦值。