making a actor bigger then smaller

mrcameron999mrcameron999 Member Posts: 182
edited October 2014 in Working with GS (Mac)

how can i make an image get bigger then smaller in a nice way and keep looping

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    There are a bunch of ways of doing this, but the one I like is to constrain the actor to a sine wave so you get a nice smooth transition . . .

    Constrain width to AAA *sin(self.time *BBB)+CCC

    Constrain height to width

    AAA = how much you want the actor to grow and shrink by in pixels.

    BBB = how fast you want the growth to be.

    CCC = the base size of the object.

    So for example if we use 30 *sin(self.time *100)+200 . . . the actor will start out at 200 x 200 pixels, grow to 230 x 230 pixels and then down to 170 x 170 pixels and then up to 230 x 230 and then down to 170 x 170 pixels . . . and so on.

  • mrcameron999mrcameron999 Member Posts: 182

    thanks

Sign In or Register to comment.