Luke Pierson
Member
Hey GMC! Making a mobile game. Need help with flick gestures. So I the flick gesture to be used to change menus in my game. Think snapchat and how you swipe left and right. So I have the code for movement and it seems to work nicely. I have one issue though.
So here's how I have it set up. There are 4 menu flick objects in my game, placed on the sides of each menu. There are three menus: The shop is on the left, with one menu flick object on the right side. The home menu is center, with 2 flick objects on both sides. Finally, the third menu for navigating inventory is on the right, with a flick object on the left side.
How I want it to work is if someone swipes their finger from the left side of the screen to the right while in the home screen, the screen will pan over to the shop menu (left of the home screen). Likewise swiping from the right side of the screen to the left while in the shop will return home etc.
Now, I have the movement working splendidly. My only issue is that I don't know how to tell the game which way the player is flicking. This results with the player being able to flick in either direction on the left side of the screen to go to the shop (you can put your finger on the left side of the home menu and then flick even more left and still go to the shop). I want it so that you can only swipe away from where you want to go to get there, if that makes sense. Thanks in advance
So here's how I have it set up. There are 4 menu flick objects in my game, placed on the sides of each menu. There are three menus: The shop is on the left, with one menu flick object on the right side. The home menu is center, with 2 flick objects on both sides. Finally, the third menu for navigating inventory is on the right, with a flick object on the left side.
How I want it to work is if someone swipes their finger from the left side of the screen to the right while in the home screen, the screen will pan over to the shop menu (left of the home screen). Likewise swiping from the right side of the screen to the left while in the shop will return home etc.
Now, I have the movement working splendidly. My only issue is that I don't know how to tell the game which way the player is flicking. This results with the player being able to flick in either direction on the left side of the screen to go to the shop (you can put your finger on the left side of the home menu and then flick even more left and still go to the shop). I want it so that you can only swipe away from where you want to go to get there, if that makes sense. Thanks in advance
Last edited: