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...
GPUParticlesAttractor3D
繼承: VisualInstance3D < Node3D < Node < Object
被繼承: GPUParticlesAttractorBox3D, GPUParticlesAttractorSphere3D, GPUParticlesAttractorVectorField3D
分隔線的抽象基底類別。
說明
粒子吸引器可以將粒子朝吸引器的原點吸,也可以將粒子推離吸引器的原點。
粒子吸引器是即時進行的,可以在遊戲過程中進行移動、旋轉、縮放。與碰撞形狀不同,吸引器支援不均勻的縮放。
臨時禁用吸引器的方法是將其隱藏,也可以將 strength 設定為 0.0。
注意:粒子吸引器只會影響 GPUParticles3D,不影響 CPUParticles3D。
屬性
|
||
|
||
|
||
|
屬性說明
粒子吸引器的衰減。較高的值會導致粒子在靠近吸引器的原點時逐漸被推動。零值或負值將導致粒子一接觸吸引器的邊緣就會被快速推動。
將受吸引器影響的粒子算繪層(VisualInstance3D.layers)。預設情況下,所有粒子都受吸引子器影響。
相應地配置粒子節點後,可以取消勾選特定層,以防止某些粒子受到吸引器的影響。例如,如果將吸引器用作法術效果的一部分,但不希望吸引器影響同一位置的不相關天氣粒子,則可以使用該屬性。
通過在 GPUParticles3D 節點上設定 ParticleProcessMaterial.attractor_interaction_enabled,也可以在每個程序材質的基上禁用粒子吸引。
調整吸引器的方向。在 0.0 處,吸引器完全沒有方向性:它會將粒子吸引到其中心。在 1.0 中,吸引器是完全定向的:粒子將始終被推向局部 -Z(如果 strength 為負數,則推向 +Z)。
注意:如果 directionality 大於 0.0,則可以通過旋轉 GPUParticlesAttractor3D 節點,來改變粒子推送的方向。
如果 strength 為負,則粒子將被反向推動。如果 directionality 為 0.0,則粒子將被推離吸引器的原點,如果 directionality 大於 0.0,則粒子將被推向局部 +Z。