How do I make an image rotate from side to side? like this?

JejldevsJejldevs Member Posts: 15
edited September 2012 in Working with GS (Mac)
how do I make an image rotate side from side like this?

Comments

  • JejldevsJejldevs Member Posts: 15
    Pls help!
  • JejldevsJejldevs Member Posts: 15
    Is it possible with the rotate behavior? but how?
  • WhackojackWhackojack Member, PRO Posts: 20
    Well there are a number of things you could do. First and most obvious is make it an animation. You could do it with timers and the rotate function also.

  • TesseractEngineTesseractEngine Member Posts: 180
    Take a look at this, @Jejldevs.

    http://tesseractengine.com/GShelp/wobble.gameproj.zip

    My only concern with that quick-and-dirty method is if Interpolate suddenly flips out and decides to get to either point by going right round in a circle.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Try setting an angular velocity that suits the speed you want and then just set a time for every 1 second change self.motion.angularvelocity to self.mkntion.angilarvelocity * -1

    You can also use interpolate but for that you need to rotate your image 90 degrees to the right before importing it into the actor. Then turn it up 90 degrees. Then you won't have the flip out issue cause you are interpolating between like 80 and 100 for example.
  • TesseractEngineTesseractEngine Member Posts: 180
    Nice lateral thinking @tenrdrmer on the interpolate method, I like that! +1 Awesome.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2012

    Agreed, @TesseractEngine, that's neat and elegant from @tenrdrmer so +1 Awesome from me as well. :-)
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Aw shucks guys :\">
Sign In or Register to comment.