is it possable to do this in GS?

slevslev Member Posts: 99
edited November -1 in Working with GS (Mac)
is it possable to have an actor bounce like this ie. back and forth along a set path
heres a VERY quick video i made in flash to illustrate



cheers!

Comments

  • mlaftamlafta Member Posts: 147
    off course
  • slevslev Member Posts: 99
    mlafta do you mean the subjects gone off course or of course you can do it ... if so how? it needs to be a repeated looped movment not just a random bounce...

    cheers
  • entersimonentersimon Member, PRO Posts: 273
    There are a couple of ways to get it done, but a quick way would be to use interpolate. Interpolate to the first x,y position at the top, then to the next x,y below and so on and so on. Then you could change the speed of the actor by changing the time it takes to interpolate.

    Make a text attribute called Left. Leave it empty

    Then either make 2 new actors, or use another actor and make a couple of instances of it and get rid of the rules and such that are associated with it. Then put one on the right side of the screen, at the point you want the ball to go the other direction, and one to the left side of the screen.

    Inside the left one make a rule that says

    If actor overlaps (your ball actor)

    Change attribute (Left) to (leave the box blank)

    In the actor to the right side of the screen make a rule that says

    If actor overlaps (your ball actor)
    change attribute (Left) to Yes

    put all the interpolates that move the ball right into a new rule that says:

    If Attribute (Left) IS

    And you leave that box blank,

    Then put all your other interpolates that will be moving left into a rule that says

    If Attribute (Left) IS Yes
  • slevslev Member Posts: 99
    thanks for that enetersimon!

    just a quick one ... would this give the ball a smooth curved transion between high and low points or a spikey up and down transion ?

    also would this work on IOS becuase ive heard some people say interpolate uses allot of memory ?

    regards
  • slevslev Member Posts: 99
    bump?
  • simo103simo103 Member, PRO Posts: 1,331
    think if you search 'trig' in GS creator you will be able to double click Orbz's awesome trigs template showing various movements 'done the right way' : ie using math. I think the sun one could be modified best to create the effect you want.
  • slevslev Member Posts: 99
    thanks very much,

    any idea if this way of moving objects is heavy on memory or do computers love this sort of thing?

    im gona have a play around with it tommorow and see if i can achive the bouncing ball effect

    thanks !
  • entersimonentersimon Member, PRO Posts: 273
    Interpolating in this way shouldn't have much of an effect on RAM usage, so long as there aren't a ton of other things going on at the same time. The interpolations occur one after another. You should be able to get a decent effect, meaning not super jagged, by playing around with timing and easing. It would definitely be better to use math though. If you could make it work that route, I'd go for it.
Sign In or Register to comment.