-
Detect motion do action
Hi folks! Long time lurker here, I finally had the need to show up myself.
I’m trying to do this:
I have trapcode particular generating lines from the movement of a light (actually of a null attached to a light).
I’d like it to stop generating particles when there is no movement. I’d like it to be automated so I need expressions, I guess.
I’m thinking about an IF/THEN statement like:
IF the null position value changes THEN particles/sec = N, ELSE particles/sec = 0.
Any hints on how to write it? Maybe I can check if there’s movement by subtracting the position value at each frame with the value of the frame before, if it equals zero then there is no movement. Or maybe there’s some pertinent expressions for this purpose.
Any suggestions will be much appreciated, thanks a lot!
Mauro.