Search Unity

[NEW UPDATE!] Fingers - Touch Gestures - #1 in Quality, Support and Features : Dozens of Gestures✓

Discussion in 'Assets and Asset Store' started by jjxtra, Apr 25, 2016.

  1. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    If you have any UI, ensure any UI elements you want to pass gestures through are in the pass through list of the fingers script.
     
  2. hexaust_

    hexaust_

    Joined:
    Mar 7, 2015
    Posts:
    23
    There are multiple UI elements, I tried adding the root Canvas to the pass through list, but nothing changes. Is this the right way?
     
  3. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    That should work. Feel free to email the project and I will have a look.
     
  4. hexaust_

    hexaust_

    Joined:
    Mar 7, 2015
    Posts:
    23
    Where should I email the project? Thank you!
     
  5. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    For any support or files, email links to support@digitalruby.com
     
  6. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I looked in your scene, did not see your test script anywhere so added to the main camera. Also added the scroll view to the pass through list. Then I got swipe ended events. Let me know if you see the same.
     
  7. UDN_8c4bf4c0-e2ee-403c-bcb3-6571a8fca105

    UDN_8c4bf4c0-e2ee-403c-bcb3-6571a8fca105

    Joined:
    Feb 15, 2017
    Posts:
    2
    I want to detect touch began, touch moved, for a particular area of the screen. Ie not waiting for a tap or a swipe. Should I be writing a Gesture subclass for this, or should I just inspect the FingerScript Touches? Thanks for any guidance. :)
     
  8. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You can use a pan gesture and assign the platform specific view to any game object with a box collider for the region you want to detect. You would need one pan gesture per area. You may need to tell the pan gesture to execute simultaneously with all other gestures (script call). Finally, you may consider setting threshold units to 0 on the gesture if you want it to detect immediately without any motion.

    Can the gesture move out of the region once it has started?

    Let me know if you have any further questions.
     
  9. UDN_8c4bf4c0-e2ee-403c-bcb3-6571a8fca105

    UDN_8c4bf4c0-e2ee-403c-bcb3-6571a8fca105

    Joined:
    Feb 15, 2017
    Posts:
    2
    Great, thanks for your help!
     
  10. Sudarmin-Then

    Sudarmin-Then

    Joined:
    Nov 27, 2014
    Posts:
    27
    How can I zoom in/out at the center of my pinch, currently it's zooming only on the center of the gameobject?
    I want to zoom to text of a book and right to it, not to have to pan it again
     
  11. adri1992

    adri1992

    Joined:
    Dec 14, 2015
    Posts:
    34
    Hi! I've a question about this asset.

    In a scene, i've a Fingers script and a Recognize fingers Image script attached to a GameObject. When I change the scene and come back to this one, the regonition is not working... It not detects any gesture.

    Why? =(

    Congratulations for this amazing asset! =)
     
  12. MM-Mat

    MM-Mat

    Joined:
    Dec 11, 2015
    Posts:
    13
    Hi,

    I would like to use TMP_Pro alongside Fingers so I put TMP's inputs (like TMP_InputField and TMP_Dropdown) to FingersScript's ComponentTypesToDenyPassThrough list through code.

    The method containing the necessary lines is marked with RuntimeInitializeOnLoadMethod so it's (in my understanding) executed before the scene - with recognizers on it - would be built. It works well in the Editor, but as soon as I build a simple Win64 release, this setting seems to be completely ignored. Is this a bug or some inattention on my part, ie. I might have missed a step or prerequisite?

    Also, a suggestion: please consider exposing const mousePointerIds or adding a simple public method to tell if a GestureTouch is in fact a mouse button. This would make easier to extend on your code without duplicates or the necessity to change your codebase.

    Thanks in advance for any feedback.
     
  13. wxxhrt

    wxxhrt

    Joined:
    Mar 18, 2014
    Posts:
    163
    Really enjoying the asset but have got stuck, I'm currently using 2 finger pan, scale and rotate taken from the DemoScript. When I try to scale, my fingers need to be quite a length apart (an inch?) for it to register as a pan/scale rather than a rotate, can I reduce this length so scale and pan is easier to achieve with fingers close together, and rotate is harder to achieve and needs a spread of fingers?
     
  14. markofjohnson

    markofjohnson

    Joined:
    Oct 12, 2010
    Posts:
    68
    I'm using control input that is the X touch position, relative to the width of the screen. But on iOS retina GestureTouch.ScreenX is in points, and Screen.width is in pixels, ie 2x points. How do I convert between points and pixels? Yes I know its *2 in this case, but is there an API to give pixels per point?
    thanks

    ReadOnlyCollection<GestureTouch> touches = gesture.CurrentTrackedTouches;
    GestureTouch t = touches[touches.Count-1];
    Debug.Log("input "+t.ScreenX + " width "+Screen.width);
    float controlX = -1* ((t.ScreenX / Screen.width) - 0.5f);
     
  15. TheBooBear

    TheBooBear

    Joined:
    Dec 15, 2011
    Posts:
    95
    #edit I found the solution, "Clear Gestures On Level Load" needed to be turned off.

    I recently started using this package in my game. As of right now, I'm just using the joystickPreFab and it worked great up until I started using LoadSceneAsync in an additive mode.

    The joystick prefab, the touch joystick ( script receiving the event ) script and the object being moved are all in the original scene, not the scene being added. In fact, the only things in the added scene are the enemies.

    Even adding an empty scene causes the prefab to stop working...

    Any Ideas?
     
    Last edited: Feb 16, 2018
  16. Arctous

    Arctous

    Joined:
    Aug 25, 2014
    Posts:
    26
    Hello!

    I'm looking for a gesture that acts like the provided ScaleGestureRecognizer, but I want to clamp the output and need the delta between the calls. So, I was going to use the ScaleGestureRecognizer as an example to create my own gesture.

    So, I have a few questions: Is this an okay approach? Are there any pitfalls that I should consider? Do I need to put the scripts (component and gesture recognizer) in your plugin hierarchy, or can I put anywhere?

    Thanks for your time!
     
  17. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Guys I am really sorry Unity notifications for this thread were broken. I will work on responding to your posts now...
     
  18. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Are you still having this problem? If so email me at support@digitalruby.com
     
  19. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Thanks for the post, we will get this worked out via email.
     
  20. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You can tune the threshold parameter to your liking, allowing the gesture to kick in sooner.
     
  21. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Does using the X and Y properties instead help at all?
     
  22. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Your approach seems OK to me, let me know if you run into problems.
     
  23. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    I'm interested in buying this asset, need to work with Touch and Swipe gestures at the same time, if the user touch the screen the character has to jump, and if the user makes a swipe in any direction, other mechanic will be activate but without the jump. Can I achieve this without having the problem that the touch gesture is always been activate even if the user tries to make a swipe? Thanks!
     
  24. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    You can make the touch and swipe gesture execute simultaneously.
     
  25. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    Thanks for the quick response! But can I configure this in order to get the functionality that I want? I mean, the user has to be able to make the swipe and activate one mechanic without being interrupted by the touch gesture?

    You can watch this gameplay of Banana Kong, a mobile game where the can achieve something similar:



    The main character jumps when user touch the screen, but the character can also fall down from platforms when the user makes the swipe down gesture.
     
  26. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Should be no problem. You can use a tap, long press and swipe gesture to do the jump, glide and jump down movement. All gestures can execute at the same time and should not interfere with each other. If you run into any problems, shoot me an email - support@digitalruby.com and I can help you through it.
     
    diegoadrada likes this.
  27. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    Your asset store reviews mention "figuring out support for zooming at the centre of the pinch gesture via email." Can you share the solution for this please?
     
  28. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The solution is fairly straightforward. Convert the FocusX and FocusY of the zoom gesture to world coordinates and move the zoomed object transform position to those coordinates. A lerp can be used if you want a smooth move to the new location.
     
  29. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    The zoom/pan gesture demos provided all feel pretty terrible on device, with notable popping as users scale in and out. The DemoScenePan.unity is also a bit contrived as it assumes two-finger pinch, but doesn't support two-finger pan.

    Dragging and pinch-zooming (as in an adult colouring app) is surprisingly hard to get feeling "good" with Fingers (the acceleration feels wrong, and we're getting a lot of popping unless we set thresholds to zero.) and we started with source code from one of ours that does feel good, all we did was rip out its existing input handling and add ginger.s) The pinch/zoom examples included in the package feel a little contrived and not like typical interfaces. ScaleGestureRecognizer is also full of random constant numbers and seems to have a concept of acceleration, but doesn't really have a demo that shows two-finger pan/zoom feeling "good" in the first place.

    We have high hopes that as Unity has now indirectly blessed this as the semi-official gesture solution for Unity that we'd finally migrate away from the very fragile (especially in the presence of complex multi-camera or multi-scene setups) easytouch, but it feels like a good pan/zoom demo should be added to the tutorial scenes.
     
    Last edited: Mar 19, 2018
  30. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I've improved the scale gesture smoothness and re-written the scroll view scene from scratch to be 100% custom instead of Unity scrollview. I've also changed the pan scene to allow one or two finger pan. Please let me know your thoughts on the latest updates (2.2.5).
     
  31. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    From a quick check, the ZoomableScrollView Demo seems significantly improved, and the changes to ScaleGestureRecognizer.cs seem designed to address the popping I was seeing during extended 2-finger drags with begin/ends of scales. Thank you. I'm heading out for a few days of spring break, but will integrate that fully when back and respond.

    Good to know somebody else can't do anything custom with a Unity scrollview more easily than you can build your own. I do wish Unity would provide a less painful way to work with/debug the UI system as source code than the DLLs, as scrollviews and autolayout are full of dragons, and the docs are high level in the extreme...
     
  32. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I'm still improving the scroll view. It needs to maintain the scale position as it zooms, and it is not quite there yet. Hopefully will do another update today with that working. I'm also parameterizing the bounciness and drag for pan velocity, etc. so that you don't have to edit code to tweak things.
     
  33. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    I finally got the scale working smoothly on the new scroll view! It is now out on the asset store, version 2.3.0!

     
  34. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Using Fingers Gestures in your game or app? Post here and I'll put any screenshots or videos in a "made with" section on the asset store and my website, linking back to your game.
     
  35. wara0516

    wara0516

    Joined:
    Jun 24, 2013
    Posts:
    5
    Hello
    I want to obtain the screen address when tapping multiple.
    It does not work with the code. Advice please.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. //using DigitalRubyShared;
    5. using TMPro;
    6.  
    7. namespace xxxx
    8. {
    9.     public class FingerMultiTap : MonoBehaviour
    10.     {
    11.      
    12.         public TMP_Text statusText1;
    13.         public TMP_Text statusText2;
    14.         public TMP_Text statusText3;
    15.         public TMP_Text statusText4;
    16.         public TMP_Text statusText5;
    17.         public TMP_Text statusText6;
    18.         public TMP_Text statusText7;
    19.         public TMP_Text statusText8;
    20.         public TMP_Text statusText9;
    21.         public TMP_Text statusText10;
    22.  
    23.         private void Start()
    24.         {
    25.             //1
    26.             DigitalRubyShared.TapGestureRecognizer FingerTap1 = new DigitalRubyShared.TapGestureRecognizer();
    27.             FingerTap1.MinimumNumberOfTouchesToTrack = FingerTap1.MaximumNumberOfTouchesToTrack = 1;
    28.             FingerTap1.StateUpdated += TapCallback1;
    29.             //2
    30.             DigitalRubyShared.TapGestureRecognizer FingerTap2 = new DigitalRubyShared.TapGestureRecognizer();
    31.             FingerTap2.MinimumNumberOfTouchesToTrack = FingerTap2.MaximumNumberOfTouchesToTrack = 2;
    32.             FingerTap2.StateUpdated += TapCallback2;
    33.             //3
    34.             DigitalRubyShared.TapGestureRecognizer FingerTap3 = new DigitalRubyShared.TapGestureRecognizer();
    35.             FingerTap3.MinimumNumberOfTouchesToTrack = FingerTap3.MaximumNumberOfTouchesToTrack = 3;
    36.             FingerTap3.StateUpdated += TapCallback3;
    37.             //4
    38.             DigitalRubyShared.TapGestureRecognizer FingerTap4 = new DigitalRubyShared.TapGestureRecognizer();
    39.             FingerTap4.MinimumNumberOfTouchesToTrack = FingerTap4.MaximumNumberOfTouchesToTrack = 4;
    40.             FingerTap4.StateUpdated += TapCallback4;
    41.             //5
    42.             DigitalRubyShared.TapGestureRecognizer FingerTap5 = new DigitalRubyShared.TapGestureRecognizer();
    43.             FingerTap5.MinimumNumberOfTouchesToTrack = FingerTap5.MaximumNumberOfTouchesToTrack = 5;
    44.             FingerTap5.StateUpdated += TapCallback5;
    45.             //6
    46.             DigitalRubyShared.TapGestureRecognizer FingerTap6 = new DigitalRubyShared.TapGestureRecognizer();
    47.             FingerTap6.MinimumNumberOfTouchesToTrack = FingerTap6.MaximumNumberOfTouchesToTrack = 6;
    48.             FingerTap6.StateUpdated += TapCallback6;
    49.             //7
    50.             DigitalRubyShared.TapGestureRecognizer FingerTap7 = new DigitalRubyShared.TapGestureRecognizer();
    51.             FingerTap7.MinimumNumberOfTouchesToTrack = FingerTap7.MaximumNumberOfTouchesToTrack = 7;
    52.             FingerTap7.StateUpdated += TapCallback7;
    53.             //8
    54.             DigitalRubyShared.TapGestureRecognizer FingerTap8 = new DigitalRubyShared.TapGestureRecognizer();
    55.             FingerTap8.MinimumNumberOfTouchesToTrack = FingerTap8.MaximumNumberOfTouchesToTrack = 8;
    56.             FingerTap8.StateUpdated += TapCallback8;
    57.             //9
    58.             DigitalRubyShared.TapGestureRecognizer FingerTap9 = new DigitalRubyShared.TapGestureRecognizer();
    59.             FingerTap9.MinimumNumberOfTouchesToTrack = FingerTap9.MaximumNumberOfTouchesToTrack = 9;
    60.             FingerTap9.StateUpdated += TapCallback9;
    61.             //10
    62.             DigitalRubyShared.TapGestureRecognizer FingerTap10 = new DigitalRubyShared.TapGestureRecognizer();
    63.             FingerTap10.MinimumNumberOfTouchesToTrack = FingerTap10.MaximumNumberOfTouchesToTrack = 10;
    64.             FingerTap10.StateUpdated += TapCallback10;
    65.  
    66.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap1);
    67.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap2);
    68.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap3);
    69.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap4);
    70.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap5);
    71.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap6);
    72.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap7);
    73.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap8);
    74.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap9);
    75.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap10);
    76.          
    77.             FingerTap1.RequireGestureRecognizerToFail = FingerTap2;
    78.             FingerTap2.RequireGestureRecognizerToFail = FingerTap3;
    79.             FingerTap3.RequireGestureRecognizerToFail = FingerTap4;
    80.             FingerTap4.RequireGestureRecognizerToFail = FingerTap5;
    81.             FingerTap5.RequireGestureRecognizerToFail = FingerTap6;
    82.             FingerTap6.RequireGestureRecognizerToFail = FingerTap7;
    83.             FingerTap7.RequireGestureRecognizerToFail = FingerTap8;
    84.             FingerTap8.RequireGestureRecognizerToFail = FingerTap9;
    85.             FingerTap9.RequireGestureRecognizerToFail = FingerTap10;
    86.  
    87.             DigitalRubyShared.FingersScript.Instance.ShowTouches = true;
    88.             statusText1.text = "";
    89.             statusText2.text = "";
    90.             statusText3.text = "";
    91.             statusText4.text = "";
    92.             statusText5.text = "";
    93.             statusText6.text = "";
    94.             statusText7.text = "";
    95.             statusText8.text = "";
    96.             statusText9.text = "";
    97.             statusText10.text = "";
    98.  
    99.  
    100.             DigitalRubyShared.FingersScript.Instance.CaptureGestureHandler = CaptureGestureHandler;
    101.          }
    102.  
    103.         private static bool? CaptureGestureHandler(GameObject obj)
    104.         {
    105.             //PassThrough
    106.             return false;
    107.         }
    108.  
    109.         private void TapCallback1(DigitalRubyShared.GestureRecognizer tapGesture)
    110.         {
    111.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    112.             {
    113.                 statusText1.text = string.Format("Tap[1]:{0}:{1}:{2}", tapGesture.FocusX,tapGesture.FocusY,(tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    114.                 Debug.Log(statusText1.text);
    115.             }
    116.         }
    117.         private void TapCallback2(DigitalRubyShared.GestureRecognizer tapGesture)
    118.         {
    119.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    120.             {
    121.                 statusText2.text = string.Format("Tap[2]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    122.                 Debug.Log(statusText2.text);
    123.             }
    124.         }
    125.         private void TapCallback3(DigitalRubyShared.GestureRecognizer tapGesture)
    126.         {
    127.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    128.             {
    129.                 statusText3.text = string.Format("Tap[3]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    130.                 Debug.Log(statusText3.text);
    131.  
    132.             }
    133.         }
    134.         private void TapCallback4(DigitalRubyShared.GestureRecognizer tapGesture)
    135.         {
    136.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    137.             {
    138.                 statusText4.text = string.Format("Tap[4]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    139.                 Debug.Log(statusText4.text);
    140.             }
    141.         }
    142.         private void TapCallback5(DigitalRubyShared.GestureRecognizer tapGesture)
    143.         {
    144.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    145.             {
    146.                 statusText5.text = string.Format("Tap[5]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    147.                 Debug.Log(statusText1.text);
    148.             }
    149.         }
    150.         private void TapCallback6(DigitalRubyShared.GestureRecognizer tapGesture)
    151.         {
    152.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    153.             {
    154.                 statusText6.text = string.Format("Tap[6]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    155.                 Debug.Log(statusText1.text);
    156.  
    157.             }
    158.         }
    159.         private void TapCallback7(DigitalRubyShared.GestureRecognizer tapGesture)
    160.         {
    161.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    162.             {
    163.                 statusText7.text = string.Format("Tap[7]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    164.                 Debug.Log(statusText1.text);
    165.  
    166.             }
    167.         }
    168.         private void TapCallback8(DigitalRubyShared.GestureRecognizer tapGesture)
    169.         {
    170.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    171.             {
    172.                 statusText8.text = string.Format("Tap[8]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    173.                 Debug.Log(statusText8.text);
    174.             }
    175.         }
    176.         private void TapCallback9(DigitalRubyShared.GestureRecognizer tapGesture)
    177.         {
    178.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    179.             {
    180.                 statusText9.text = string.Format("Tap[9]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    181.                 Debug.Log(statusText9.text);
    182.             }
    183.         }
    184.         private void TapCallback10(DigitalRubyShared.GestureRecognizer tapGesture)
    185.         {
    186.             if (tapGesture.State == DigitalRubyShared.GestureRecognizerState.Ended)
    187.             {
    188.                 statusText10.text = string.Format("Tap[10]:{0}:{1}:{2}", tapGesture.FocusX, tapGesture.FocusY, (tapGesture as DigitalRubyShared.TapGestureRecognizer).TapTouches.Count);
    189.                 Debug.Log(statusText10.text);
    190.             }
    191.         }
    192.     }
    193. }
     
    Last edited: Mar 27, 2018
  36. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Can these taps execute at the same time? If so, you should remove the RequireGestureRecognizerToFail code and instead add a "AllowSimultaneousWithAllGestures" call. Let me know...
     
  37. wara0516

    wara0516

    Joined:
    Jun 24, 2013
    Posts:
    5
    Hello
    thank you for your answer.
    I am sorry that my English is No good.

    I tried but it gets only one screen address. Need to acquire the address of each finger. Is this possible?

    Code (CSharp):
    1.  
    2.         private void Start()
    3.         {
    4.             //1
    5.             DigitalRubyShared.TapGestureRecognizer FingerTap1 = new DigitalRubyShared.TapGestureRecognizer();
    6.             FingerTap1.MinimumNumberOfTouchesToTrack = FingerTap1.MaximumNumberOfTouchesToTrack = 1;
    7.             FingerTap1.StateUpdated += TapCallback1;
    8.             //FingerTap1.AllowSimultaneousExecutionWithAllGestures();
    9.             //2
    10.             DigitalRubyShared.TapGestureRecognizer FingerTap2 = new DigitalRubyShared.TapGestureRecognizer();
    11.             FingerTap2.MinimumNumberOfTouchesToTrack = FingerTap2.MaximumNumberOfTouchesToTrack = 2;
    12.             FingerTap2.StateUpdated += TapCallback2;
    13.             //FingerTap2.AllowSimultaneousExecutionWithAllGestures();
    14.  
    15.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap1);
    16.             DigitalRubyShared.FingersScript.Instance.AddGesture(FingerTap2);
    17.  
    18.             FingerTap1.AllowSimultaneousExecutionWithAllGestures();
    19.             FingerTap2.AllowSimultaneousExecutionWithAllGestures();
    20.  
    21.    }
    22.  
     
  38. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    No need to set
    FingerTap1.MinimumNumberOfTouchesToTrack = FingerTap1.MaximumNumberOfTouchesToTrack or FingerTap2.MinimumNumberOfTouchesToTrack = FingerTap2.MaximumNumberOfTouchesToTrack = 2;

    If you just want to track finger locations, the pan gesture might be a better bet. What are you trying to accomplish with all the finger touches?
     
  39. wara0516

    wara0516

    Joined:
    Jun 24, 2013
    Posts:
    5
    thank you.

    I tried it, but I did not get what I wanted.
    I am thinking of Game to tap with my fingers. Tap processing is executed at the same time and I want to obtain the screen position of the fingers. Is this possible?

    For example, music games
    http://androck.jp/app/game/musicgame/touchpop/
     
  40. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Is there a specific area of the screen that has to be touched, or can the touches be anywhere?
     
  41. wara0516

    wara0516

    Joined:
    Jun 24, 2013
    Posts:
    5
    Thank you for your early reply!

    My request is. . .if possible.
    Tap any screen can be tapped.

    But...
    Even if it can not, there is no problem because I think about another way.

    Good luck.
     
  42. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Ok. Let me know if I can help further. You may be able to stick with Input.touches if all you care about is touch positions.
     
  43. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Just FYI I uploaded a demo scene for platform jumping, movement and swipe down to drop down through a platform.
     
    diegoadrada likes this.
  44. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Here is a demo of the new platform gesture component. Takes care of the pan gesture to move, tap gesture to jump and swipe down and hold to drop down through the platform. This is live in the latest version (2.3.2).

     
    JumpingGuy likes this.
  45. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    The platform demo scene is available now in the asset store.
     
    diegoadrada likes this.
  46. harrymanjan14

    harrymanjan14

    Joined:
    Sep 6, 2015
    Posts:
    6
    Hi, I am having some issues with my game. I put in the Pan and Zoom which works, however, i had some OnMouseDown calls on a few gameobjects. Now the OnMouseDown doesn't work on those gameobjects. Does using this script cancel OnMouseDown events on gameobjects?

    I even tried adding a Fingers TouchGesture to replace my gameobjects onmousedown events and it didn't work.
     
  47. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    My code is only reading Input.touches so should not be interferring with onmousedown. Does this thread help at all? https://answers.unity.com/questions/425478/onmousedown-not-firing.html
     
  48. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Have you tried setting simulate mouse with touches to true on fingers script?
     
  49. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Just FYI all I am having carpal tunnel surgery today. Going to take a few days off from everything, be back sometime next week.
     
  50. Anydaytv

    Anydaytv

    Joined:
    Feb 28, 2018
    Posts:
    18
    Hey ya, just started messing with this asset, but thought I'd offer / request a fix to the image gestures.

    In "FingersImageAutomationScript.cs"
    Code (CSharp):
    1.  
    2.         private void OnRenderObject()
    3.         {
    4.             if(LineMaterial != null)
    5.             {
    6.                 GL.PushMatrix();
    7.                 LineMaterial.SetPass(0);
    8.                 GL.LoadProjectionMatrix(Camera.main.projectionMatrix);
    9.                 GL.Begin(GL.LINES);
    10.                 foreach (List<Vector2> lines in lineSet)
    11.                 {
    12.                     for (int i = 1; i < lines.Count; i++)
    13.                     {
    14.                         GL.Color(Color.white);
    15.                         GL.Vertex(lines[i - 1]);
    16.                         GL.Vertex(lines[i]);
    17.                     }
    18.                 }
    19.                 GL.End();
    20.                 GL.PopMatrix();
    21.  
    22.             }
    23.         }
    This fixes the LineMaterial not being set throwing massive flood errors.
    (In my case I'm going to use a mouse particle)

    Hope that helps someone! Cheers :)