GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Interpolate Question

azimpactazimpact Posts: 112Member
edited November -1 in Working with GS (Mac)
I have an actor I'm moving with Interpolate.

What is the method to get that actor to spin on it's axis in a continuous spin?

I've tried random(5,180) and various other combinations and I can get it to spin but only once.

Is there a method to interpolate spin on an actor a continuous spin?

Thanks!

Comments

  • steve86steve86 Posts: 806Member
    why dont you use the rotate behavior?
  • hotMagichotMagic Posts: 266Member, PRO
    our collectibles do that, and we just set them to rotate at X rate. you can combine that with interpolate...
  • JohnPapiomitisJohnPapiomitis Posts: 6,256Member
    to have a continuos rotation with interpolate have it like so:

    have the actors rotation set at 0

    have a Rule: when attribute self rotation = 0
    -interpolate self.rotation to 360
  • azimpactazimpact Posts: 112Member
    I didn't use the rotate because the actor is not movable so it won't work. At a certain point, there were to many moveable actors on the screen and it bogged it down, so I switched them all to interpolate and made non moveable which improved the performance greatly.

    I got them to rotate by by using the interpolate with self rotation and setting the time to allow for it to travel to where it's going while it's rotating.
  • azimpactazimpact Posts: 112Member
    John, That worked way better that what I had!!!

    Thank you!!!!
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    azimpact said:
    John, That worked way better that what I had!!!

    Thank you!!!!

    If you happen to need it to go the opposite direction use -360 and you can adjust the speed with the duration setting.

    It's not my fault I never learned to take responsibility for anything. ;)

  • theCodeMonsterstheCodeMonsters Posts: 359Member
    Yep just through a rotate behavior on it.

    _________________________________________________________________

    Need Help making for you App? Get FREE marketing here!
    LIKE us on Facebook!
    Follow us on Twitter!
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    theCodeMonsters said:
    Yep just through a rotate behavior on it.

    He is using NON-movable actors. Therefore Rotate behaviors do not work. Interpolate is the only awesome way to go. :)

    It's not my fault I never learned to take responsibility for anything. ;)

  • azimpactazimpact Posts: 112Member
    Good stuff guys!!!! Thanks again,,,

    It's amazing the difference it makes when you don't have a bunch of moveable actors on the screen. The game now only has 1 moveable actor and it is performing pretty darn good on a 2nd generation device where as before it started to choke...

    Interpolate is the way to go for sure!!!
This discussion has been closed.