Draining and Counting

Flex particles that come in contact with static mesh colliders can be deleted (drained) or counted. This only works for flex particles spawned by a Cascade emitter. In order to support “draining” or “counting” the static mesh component needs to be configured with a simplified collision geometry and setup for either overlapping or blocking Flex particles. Draining and counting can be enabled on a per Actor Class level by using a Flex Collision Component.

_images/DrainingAndCountingComponent.jpg

Enable Draining

Particles that come in contact with the corresponding actor are deleted automatically.

_images/DrainingAndCountingDrain.jpg

Counting Particles

The count value of the Flex Collision Component contains the accumulated number of all particle overlap events happening. In order to get a per frame count, an actor Blueprint can be used.

_images/DrainingAndCountingCount.jpg
_images/DrainingAndCountingBlueprint.jpg

In order to get the per frame value, the count should be reset to zero after reading it.