...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
container_emitter_speed = container_emitter.getParameter("Speed")
if (container_emitter_speed != 0.0):
container_emitter.setParameter("Speed", 0.0) |
...
The vector’s magnitude is then compared with the threshold value and, if the condition is true, the script reads out the affected particle’s ID to identify it. Another important parameter is the particle’s position here, because it is necessary to restore it to the same position when the particle has been shifted to the container. In the next step, the script removes the particle with the appropriate ID and applies it to the second emitter with the original position and velocity. That is necessary to keep the fluid stable. The threshold value could also be any other parameter, even a value from a third emitter, or even the velocity of an object – you can establish any dependency.