rotate actor back

razzsoftrazzsoft Member Posts: 38
edited November -1 in Working with GS (Mac)
Hi All,

I'm trying to rotate an actor 90 deg and then after a specified time rotate back to original position.

I can't seem to work out how.

Any ideas ?

Cheers,

cabcom

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    Set up a rotate to angle attribute within a timer.

    Rotate 90 degrees
    AFTER XX seconds ROTATE TO XX

    That should sort it :-)
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Oh and make sure it's set to relative to scene, not actor. I just found that out while trying it ;)
  • razzsoftrazzsoft Member Posts: 38
    Hi POLYGAMe,

    Thanks for your reply.

    That is what I did but it doesnt seem to work for me.

    I've got a timer that every 2 seconds has a rotate to angle of self.rotation +90, but it only rotates 90 degrees the first time
  • AfterBurnettAfterBurnett Member Posts: 3,474
    I just tried that too and it didn't work. My way worked though... don't alter the actor's self.rotation... just set a rotate to angle attribute. Works fine :)
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Oh, I know why... it's setting the self.rotation instantly, so you don't see it. You need to use interpolate or a rotation attribute so you can set the speed of the rotation itself.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Use a timer with interpolate. I just checked and it works fine. That way you can specify over what period of time to adjust the self.rotation :)
  • razzsoftrazzsoft Member Posts: 38
    thanks again, I'll try that .
  • razzsoftrazzsoft Member Posts: 38
    Would you mind posted the code you used for this.

    Cheers,

    cabcom
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi cabcom: the good thing about POLYGAMe's suggestion to use Rotate to Angle is that you can put the Behaviours in a second Timer to make it run continuously, if you wanted.

    I'll post that here as well, if you like. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • razzsoftrazzsoft Member Posts: 38
    Yes Please and thank you for all the help.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    I dunno how to post images... I'm a noob myself :(
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Create a timer. Set it to "every" 2 seconds.

    Within the timer, place an interpolate behaviour. In that, you can specify it to interpolate rotation... just select it as you did in your original version. You can also specify how fas/slow it does it.

    Hope this helps!
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    The following works, except it waits for 4 seconds before running, but i'm sure a bit of tinkering with the Rules would sort that. Here it is:

    Photobucket

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • razzsoftrazzsoft Member Posts: 38
    Thanks again, I think I've got it now.

    Cheers,

    cabcom
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Ah flips, done it again, pressed quote instead of Edit (was adding about posting images at the end). Done that more than once before; no way to delete it now, ah well.

    The following works, except it waits for 4 seconds before running, but i'm sure a bit of tinkering with the Rules would sort that. Here it is:

    Photobucket

    :-)

    PS I post images this way: I use Grab to get tiff image of Rules; save to jpeg in PS; upload to Photobucket, copy the HTML code; paste that into the post. Seems to work out OK...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • AfterBurnettAfterBurnett Member Posts: 3,474
    Cheers :)
Sign In or Register to comment.