Continuos Swipe Rotate help
KEE4
www.chriskieffer.comLos AngelesMember Posts: 65
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
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
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
Change attribute self.rotation to self.rotation-90
When swipe right is true:
Change attribute self.rotation to self.rotation+90
Henrik: will download now and check out.
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.
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.
My Blog / App Store / Google Play