- Home /
using two finger tap gesture
How would i go about writing a script that will allocate a function to the two finger touch? We are currently using one finger touch functions for the main character of our game but need to assign a two finger gesture (tap) to the secondary character. Does unity even offer an option for two finger gestures other than the pinch?
Answer by Adamcbrz · Jan 23, 2012 at 06:15 AM
From what I understand unity does handle touch gestures. You can look into the Input.touchCount to determine how many touches you have the loop through your touches to find out what changed. From this information you can define what a pinch is or any other gesture. There is a gesture plugin in the asset store that might make that process easier but I have never used it.
Hope that helps
it's a great suggestion to USE THE PAC$$anonymous$$AGE IN THE ASSET STOR$$anonymous$$
it is a huge incredibly pointless hassle to program gestures from scratch yourself, as any seasoned apple developer will tell you!!
Unless you need gestures that aren't in that package. It's not that hard to roll-your own, but depends on how you value your time/money vs what that package costs.
Answer by Spk · Mar 22, 2012 at 08:13 PM
You may want to check out my FingerGestures plugin on the Unity Asset Store - http://fingergestures.fatalfrog.com.
That plug iun is SO GOOD, you should charge much more for it - like $100s. There is so much crap on the store, that is awesome. Thanks.