-
Bacteria -animating position at fixed intervals with not so fixed values
Hi,
I need an expression as the one posted in “animating position at fixed intervals with fixed values” but with a bit of randomness in position values: moving a layer about 5 points up, pause for 2 seconds, up again and so on.
This is the expression Dan wrote:moveTime = .3;
holdTime = 4.7;
delta = [0,-5];seg = Math.floor(time/(moveTime+holdTime));
t = time % (moveTime+holdTime);
value + delta*seg + linear(t,holdTime,holdTime+moveTime,0,delta)I’d like to add some randomness to the position value (-5), but if I put a random number there (delta=[0,random(-4,-6)]) the randomness is increasing over time and the layer is not fixed during holdTime.
Any idea?
thanks in advance
Corrado Carlevaro