Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle with fixed steps

  • Wiggle with fixed steps

    Posted by Axel Schwarz on April 19, 2007 at 9:50 pm

    Hey everyone!

    This is my first post here and I need some help on a job that I received more or less by accident…

    I need to have a square to wiggle over the screen every second and stay there for a second.
    I found the “posterizeTime()” expression to fix the problem with the interval of the jumps.

    But now I need the square to jump within a grid of 2560×2560 pixels of squares of 64 by 64 pixels. So every new position needs to be a multiple of 64…

    Anyone with a quick and dirty solution? 😉

    Greetings from Vienna, Austria.

    axel

    You don’t have to use a computer… you can use a Mac. – Tony Hawk, Professional Skateboarder

    Axel Schwarz replied 19 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 20, 2007 at 5:39 am

    Probably something like this:

    posterizeTime(5);
    x = Math.floor(random(40))*64;
    y = Math.floor(random(40))*64;
    [x,y] + [32,32]

    Dan

  • Axel Schwarz

    April 22, 2007 at 4:22 pm

    Thanks! This worked well…
    I was so focused on the wiggle Expression that I did not even consider placing the squares with random. 😉

    You don’t have to use a computer… you can use a Mac. – Tony Hawk, Professional Skateboarder

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