ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

random Swinging pendulum on duplication

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
alex dinnin
random Swinging pendulum on duplication
on Feb 13, 2018 at 6:48:38 am

Hi All,

I have a pendulum that is swinging via an expression

Math.sin(time *5) * 15

I'm very happy with this.. it's working very well..

however I need quite a few pendulums and I want them to be swinging the same speed and length.. I just want them to start at different times.

So when I duplicate the layer.. it changes the start of the swing so they are swinging randomly

hope this makes sense.. any help greatly appreciated

Alex

Math.sin(time *5) * 15



Return to posts index

Dan Ebberts
Re: random Swinging pendulum on duplication
on Feb 13, 2018 at 6:59:58 am

Try this:

seedRandom(index,true);
Math.sin(time *5 + random(Math.PI*2)) * 15


Dan



Return to posts index

alex dinnin
Re: random Swinging pendulum on duplication
on Feb 13, 2018 at 7:02:34 am

That's amazing.... thanks for the prompt reply Dan.. much appreciated



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]