Hey all, does anyone have a good example of a swipe to jump type deal? I'm trying to make a character move based off of the velocity and angle of the user!
I never tried, but I think you can do something like this:
when mouse is pressed, save Coordinate Y in a self.attribute or game attribute, your choice. when mouse is released, save coordinate Y in another one. Then, check last saved coordinate Y - first saved coordinate Y. If the number is > 0, jump.
Comments
when mouse is pressed, save Coordinate Y in a self.attribute or game attribute, your choice.
when mouse is released, save coordinate Y in another one.
Then, check last saved coordinate Y - first saved coordinate Y.
If the number is > 0, jump.
It's not perfect but it should be a start.