-
a roaming rotating square
Hi all, and thanks in advance for your help. I’m trying to achieve soemthing but cannot find ways to crack it up.
What I would like to have is a square moving itself by rotating of 90° every second. The script I’m using for that is:
segDur = 1;
seed = Math.floor(time/segDur);
segStart = seed*segDur;
seedRandom(seed,true);
startVal = Math.round(random(1))*90;
seedRandom(seed+1,true);
endVal = Math.round(random(-1, 1))*90;
ease(time,segStart,segStart + (segDur/2), startVal, endVal);So it can move either 90° left, or right, or stay still.
I want to add to that the fact that its anchor point is also randomly placed on any of its vertices every second, and thus its motion is more unpredictable. But then, I also want it to take into account its new position, and move in that fashion within the frame of the composition.
I’m not sure if this is clear, but here are examples of what I want to do (handmade animation made without expressions):
11934_squarerandomrotationexample.mp4.zipAnd what I could do so far:
11935_squarerandomrotationtryout.mp4.zipThanks a million for your help.
—-
Simon
Sorry, there were no replies found.