GPUParticlesCollision3D
繼承: VisualInstance3D < Node3D < Node < Object
被繼承: GPUParticlesCollisionBox3D, GPUParticlesCollisionHeightField3D, GPUParticlesCollisionSDF3D, GPUParticlesCollisionSphere3D
影響 GPUParticles3D 節點的 3D 粒子碰撞形狀的抽象類別。
說明
粒子碰撞形狀可用於使粒子停止或對其反彈。
粒子碰撞形狀是即時的,在遊戲過程中可以移動、旋轉和縮放。與吸引器不同,碰撞形狀的非均勻縮放不受支援。
粒子碰撞形狀可以通過隱藏而暫時禁用。
注意:在 GPUParticles3D 的處理材質上,ParticleProcessMaterial.collision_mode 必須是 ParticleProcessMaterial.COLLISION_RIGID 或 ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT,才能使碰撞生效。
注意:粒子碰撞只影響 GPUParticles3D,不影響 CPUParticles3D。
注意:由正在移動的碰撞器推動的粒子不會被插值,這可能會導致可見的卡頓。這可以通過將 GPUParticles3D.fixed_fps 設定為 0 或一個符合或超過目標畫面播放速率的值來緩解。
屬性
|
屬性說明
The particle rendering layers (VisualInstance3D.layers) that will be affected by the collision shape. By default, all particles that have ParticleProcessMaterial.collision_mode set to ParticleProcessMaterial.COLLISION_RIGID or ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT will be affected by a collision shape.
After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by colliders. For example, this can be used if you're using a collider as part of a spell effect but don't want the collider to affect unrelated weather particles at the same position.
Particle collision can also be disabled on a per-process material basis by setting ParticleProcessMaterial.collision_mode on the GPUParticles3D node.