How to swipe to move in intermediate directions

Hi,
How would I make it so when you swipe Up/right the player would move that way. Same with Up/ left because I need my player to be able to jump on platforms.
Thanks
How would I make it so when you swipe Up/right the player would move that way. Same with Up/ left because I need my player to be able to jump on platforms.
Thanks
Comments
You would need four attributes to detect the the x and y of the touch and release. (Choose "real" as the attributes' type.
Then you can get the angle with:
vectorToAngle( self.myReleaseX - self.myTouchX , self.myReleaseY - self.myTouchY )
Do do use change attribute -- here is how.
You could make an attribute called something like "mySwipeAngle" or whatever. Set it to be of type "real".
Then I suppose you could have a big background actor with the following behaviors:
When touch is pressed:
Change Attribute: self.myTouchX To: game.Mouse.Position.X
Change Attribute: self.myTouchY To: game.Mouse.Position.Y
When touch is released:
Change Attribute: self.mySwipeAngle To: vectorToAngle(game.Mouse.Position.X - myTouchX, game.Mouse.Position.Y - myTouchY)
Make sure to use the drop down menus in the expression editor to create the change attribute behaviors. (Don't just type them in.)
Then you can do what you want with the swipe angle!