Author Topic: [2.x] Is it possible to use multiple gestures at once?  (Read 3353 times)

Offline William Ravaine

  • Administrator
  • Regular Poster
  • *****
  • Posts: 657
  • Karma: +27/-2
    • View Profile
    • Fatal Frog Software
[2.x] Is it possible to use multiple gestures at once?
« on: 28 February, 2012, 10:17:13 AM »
Quote
I was wondering if with FingerGestures it would be possible to use multiple gestures at once. If not possible by default, could you offer some advice on how to go about doing this?
For example, while dragging and object with one finger, I want to be able to use my other hand to pinch and zoom with two fingers

Yes it is possible, but it requires a little bit of extra work for some gestures.

Most of the common gestures have a "per finger" version. For instance, OnFingerDragMove, OnFingerSwipe, OnFingerTap... These are independent of each other. There also are the "global gesture" version of these, which only trigger if the correct number of fingers are down. For instance, FingerGestures.OnTap will not trigger if 2 fingers are down, as it requires one and only 1 finger to be down.

The pinch gesture is part of these "global" ones, as it requires exactly 2 fingers to trigger. So out of the box, it will not recognize the gesture if a 3rd finger is touching the screen. However, there is a solution to this. FingerGestures allows you to provide a TouchFilter object to each GestureRecognizer. This TouchFilter allows you to modify the list of touches/fingers sent to the GestureRecognizer before it processes them. This is how the default per-finger gestures are done as well.

In your case, you can either add a new PinchGestureRecognizer to your scene or directly access the FingerGestures.Defaults.Pinch recognizer and set its "TouchFilter" property to a new TouchFilter you provide. In this filter, you'd have to work out the logic to identify and remove the extra fingers touching the screen, so that the PinchGestureRecognizer is then fed only two fingers.
« Last Edit: 17 March, 2013, 11:01:29 AM by William Ravaine »

Offline patch24

  • FingerGesturer
  • Recruit
  • ****
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Is it possible to use multiple gestures at once?
« Reply #1 on: 03 March, 2012, 01:52:56 AM »
It would be great to have a sample scene involving touch filters...and the new global touch filters.  When creating a touch filter object, what all is involved in that?  How does it reference the specific gesture?

Offline William Ravaine

  • Administrator
  • Regular Poster
  • *****
  • Posts: 657
  • Karma: +27/-2
    • View Profile
    • Fatal Frog Software
Re: Is it possible to use multiple gestures at once?
« Reply #2 on: 03 March, 2012, 03:03:47 PM »
I will write a tutorial about that soon, just haven't had the time yet with all the hosting and website update stuff lately :)

Offline NGKrush

  • Recruit
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Is it possible to use multiple gestures at once?
« Reply #3 on: 16 August, 2012, 01:30:58 PM »
Is it possible to create multiplayer games using simultaneous swiping gestures from both players. Is the max. simultaneous gestures limited to the smartphone or does Finger Gestures have a max number of swipes (or other gestures) that can be calculated at the same time?


Offline William Ravaine

  • Administrator
  • Regular Poster
  • *****
  • Posts: 657
  • Karma: +27/-2
    • View Profile
    • Fatal Frog Software
Re: Is it possible to use multiple gestures at once?
« Reply #4 on: 26 August, 2012, 09:27:23 AM »
The limits are the one imposed by the platform/device you run the app on.  Swipes can be detected "per-finger" via the OnFingerSwipe event (or TBSwipe toolbox script). This allows you to detect multiple swipes at once, using the "fingerIndex" value to identify which finger performed the gesture.

Offline GimaldZemWeela

  • Regular Poster
  • **
  • Posts: 10038
  • Karma: +0/-0
    • View Profile
    • Email
Lkvjxvurptkc
« Reply #5 on: 24 November, 2015, 04:20:39 AM »
Сочинение  моя звезда
Иеромонах исаак житие паисия святогорца скачать бесплатно
Как снимают порно под водой
Как сделать аэробот своими руками
Как завязать ленту на руке
Manual instrucciones siemens gigaset al14h
Где расположен вин код на прадо 150
Автобус самара нижний новгород расписание
Игра время деньги скачать бесплатно
Россия. военные тайны сборник книг скачать бесплатно
Скачать matrix 2.0 файлообменник
Варить нухут
Вязание крючком корея
Как связать чуни на двух спицах
Скачать игру sex porno для андроид
Неке тосеги
Постановление о назначении баллистической экспертизы образец рк
Расписание авобуса давыдово через заречку
Набить друг на руке парню
Скачать обход x-trap для crossfire
Сценарий школьного спектакля ромео и джульетта
Juicy lucy xxxtreme slutmachines vol 1 extreme erotic slot machine скачать бесплатно
Скачать бесплатно шаблон для фото женщин
План конспект урока по физической культуре 5 класс легкая атлетика
Я выбрал фельдшер когда я был маленкой сочинение
 Xwchgjhywdvi Ogtniwktpssl Rrpdhpnfbxmx Onoyvrwjdwuh Yqczjnzjtyco Iyothczorzns Pemohgbeougn Lyzdzkalmkas