Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions random Swinging pendulum on duplication

  • random Swinging pendulum on duplication

    Posted by Alex Dinnin on February 13, 2018 at 6:48 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

    Alex Dinnin replied 8 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 13, 2018 at 6:59 am

    Try this:

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

    Dan

  • Alex Dinnin

    February 13, 2018 at 7:02 am

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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy