Continuos Swipe Rotate help

KEE4KEE4 www.chriskieffer.comLos AngelesMember Posts: 65
edited July 2012 in Working with GS (Mac)
Im building an element wher that when you swipe left rotate 90 degrees and swipe right rotate -90 degrees. I have the swipe feature working, wether its swiping left or right. But I cant figure how to make it rotate. I Did interpolate but the problem is i need this to happen.

Swipe left rotate 90 degrees. if you swipe left again rotate another 90 degrees. swipe right it would -90 degrees.

I know it sounds confusing but any help would be appreciated.
Thanks

Answers

  • HC_DKHC_DK Member Posts: 92
    I have made a quick demo where I used @Tshirtbooth´s swipetomovedemo.

    All I do is adding an ANGLE attribute (local) and inside the rule for RIGHT swipe I change: self.New Rotation to self.Rotation-90

    Then use the ROTATE TO ANGLE behaviour where Angle: self.New Rotation Relative to Scene

    I the rule for LEFT is it just to add 90 to self.Rotation.

    You can download the file here: http://dl.dropbox.com/u/12878764/swipetorotatedemo.zip

    HC
  • ChobbifaceChobbiface PRO Posts: 491
    When swipe left is true:

    Change attribute self.rotation to self.rotation-90

    When swipe right is true:

    Change attribute self.rotation to self.rotation+90
  • KEE4KEE4 www.chriskieffer.com Los AngelesMember Posts: 65
    tshirt: I have it working but it only rotates once in either direction.
    Henrik: will download now and check out.
  • KEE4KEE4 www.chriskieffer.com Los AngelesMember Posts: 65
    Tshirt: That was it! Thanks
    Henrik: I found a piece in your to explain what thsirt said. Thanks to you too!!!
    Thats what I like about these forums. You guys all rock.
  • mhedgesmhedges Raised on VCS Member Posts: 634
    hi there

    [...]

    that should do it

    cheers
    Hello -

    Sorry to bring the thread back from the dead, but I have a peculiar situation with this. If you quickly press (or swipe) left then right, or the opposite, the player may end up facing a non-right angle.

    Is there any way to condition the above so that inputs are ignored until a full 90 degrees have been turned in a direction?

    Thanks, regards.
Sign In or Register to comment.