Distance Test
Send particles on to another event when they're nearer to an object, or farther from it, than a distance.
Particles nearer to or farther from an object than a distance go along the wire.
- Add it
- EventAdd OperatorTestsDistance Test
- Sends on
- Along its wire: particles nearer to (or farther from) the object than the distance.
- Influence
- Yes: it works only on particles whose value is above a half.
When to use it
- Nearer than: something passing sets particles off: a rake through leaves, a hand through a swarm, a car through dust.
- Farther than: particles that stray too far, to remove them or bring them back.
Set it up
Settings
As the flow editor’s sidebar shows them. Changing any of them marks the bake old; those marked Keyframable can also change through a bake.
What the distance is measured to.
- Origin: The object's origin.
- Surface: The nearest point of the object's surface.
How far: to the object for a test, between particles for a bind, or along the ray for a raycast.
One of the flow’s number values, to weigh it by, particle by particle. Empty for all of it, on all of them. See Influence.
To
- Origin: the distance to the object's origin, wherever it goes. Any object will do, an empty too.
- Surface: the distance to the nearest point of its surface, as it moves and deforms. It needs an object with a surface: a mesh, curve, text and the like.
Distances are measured in the world, so a scaled object measures true. The object is where it is halfway through each substep.
With Nearer Than on it sends the nearer ones; off, the farther ones.
The wire
Not wired, a Distance Test does nothing: particles stay. The first test in the stack that picks a particle out wins.
Works with
- Delete, in the event it sends to, for particles that stray too far.
- Set Value From Distance gives each particle its distance as a number, to weigh a force by.
- Influence: weighed by a value, only particles whose value is above a half are tested.
Problems you may see
event: operator: 'object' has no surface
Errors stop a bake; warnings don’t. Every message is on the Messages page.