Add "Hide on Contact" collision mode to ParticlesMaterial

This can be used to make particles disappear when colliding, rather
than bouncing around or sticking to surfaces.

This is useful for rain particles which should not be able to go
through floors/ceilings, but shouldn't stick to surfaces either.
This commit is contained in:
Hugo Locurcio
2022-05-20 23:59:13 +02:00
parent fafd15014f
commit 17ad6df56d
8 changed files with 79 additions and 29 deletions

View File

@@ -5,7 +5,7 @@
</brief_description>
<description>
Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes.
[b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work.
[b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D].
</description>
<tutorials>