Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] FingerGestures - Robust input gestures at your fingertips!

Discussion in 'Assets and Asset Store' started by Bugfoot, Jul 8, 2011.

  1. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    If you are interested in the PlayMaker integration, please leave some comments/suggestions in on the FG forum thread here.. Thanks!
     
  2. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Having some trouble with tapping or double tapping a particular object. I've been using your demos along with the source code from your website to try get it working but the source code calls PickObject( fingerPos ) which doesn't exist anywhere in the script or in any of the other scripts in the project.

    Is there a simpler way to do this? All I need to know is if the double tap occurred in the game object's space/collider.
     
    Last edited: Mar 21, 2012
  3. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    The PickObject() method is part of the sample code, in SampleBase.cs (public static GameObject PickObject( Vector2 screenPos )).

    But if you want to save yourself some troubles, just use the toolbox scripts: Add one TBInputManager instance to your scene (you just need one), and then add the TBTap component on the object you want to make tap-able. When this happens, the object will be sent a "OnTap" message by default (via the MonoBehaviour.SendMessage() method). You can check the Toolbox-OnFingerGestures sample scene for a practical example.

    Let me know if you need more help!
     
  4. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Thanks for the info. I'll give it a go.
     
  5. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Works like a charm! ToolBox sure makes life simple. Thanks again for the advice.
     
  6. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Quick notice: you can now register your FingerGestures copy on the forum and get direct download access to the new updates from the Releases section.

    Also, PlayMaker integration currently in progress :)
     
  7. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Little reminder: 2 days left on the 35% OFF special sale!
     
  8. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    The madness sale is now over! A big thank you to everyone who participated and bought FingerGestures, I hope you're enjoying i!

    In other news, I've recently released a first beta version of the FingerGestures actions for PlayMaker, so that you can easily detect all the supported gestures from your favorite visual scripting plugin ;) So if you own both PlayMaker and FingerGestures, please give this a try and let me know your feedback!
     
  9. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Many thanks for the FingerGestures actions for PlayMaker, I`m really eager to try them out. :)
    Also, many thanks for the madness sale, too!!
     
  10. cyberkada

    cyberkada

    Joined:
    Sep 28, 2009
    Posts:
    15
    New FG user here...

    Any way to do a single and double click on an object through the Toolkit?
     
  11. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Sure, put the TBTap script on the object you want to tap and set its Tap Mode property to either single or double tap. You can change the name of the method it should call via SendMessage() when a tap occurs on this object.

    You will also need to have an object in your scene with the TBInputManager component on it.

    I'm currently reworking the documentation, so I'll try to make all that stuff a lot clearer and easier to find for new users.
     
  12. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Hi guys,

    I've been hard at work revamping the documentation this week, and I would really appreciate if you could give me some feedback on the new Introduction page now available on the Documentation wiki.

    Basically, I woud l like to know if:
    - It makes sense / is clear enough
    - Are there topics you think are missing from this overview?
    - Is it too long/detailed, too short/lacking in details, or well balanced?
    - Do you feel it gives you a good big picture of FingerGestures?

    And any other comment/suggestion you might have

    Thanks in advance for your help!
     
  13. ShawnMcCoo1

    ShawnMcCoo1

    Joined:
    Dec 26, 2011
    Posts:
    39
    Hi! Been using FingerGestures and it's been great. Any plans for Flash support?

    FingerGestures is literally the only code in my system that isn't completely Flash compatible.
     
    Last edited: Apr 16, 2012
  14. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Nice work!

    After a quick review it seems well done.
    Later I will take more time to dig into.

    Cheers
    Kenshin
     
  15. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Hi Shawn,
    Thanks for the kind words!

    I haven't looked into Flash support, but it's on the todo list. No ETA yet though, sorry :(
     
  16. cjow

    cjow

    Joined:
    Feb 29, 2012
    Posts:
    132
    Hi,

    How might I go about limiting the distance you can drag an object from it's starting point, getting the distance moved from the starting point and getting the angle from starting point.

    Could you just do something like: cos θ = ((startx * endx) + (starty * endy)) / (start * end) for the angle? My math is pretty rusty so not even sure if that's correct (or even close :p).

    Any help would be much appreciated.

    Thanks.
     
    Last edited: Apr 17, 2012
  17. A_Rival

    A_Rival

    Joined:
    Jun 22, 2008
    Posts:
    3
    +1 for Flash support.

    At my workplace, a fellow co-worker is claiming that Unity3D's Flash export support is "minimal at best" due to it not supporting "libraries"...which, at this point, comes down to Fingergestures.

    Short of rewriting all of his code to remove any trace of Fingergestures, I humbly/kindly ask you to have a quick look as to why your library is not compiling to Flash. :) We are in danger of switching to something terrible for iOS such as HTML5.

    Thank you!

    -A
     
  18. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    I'll take a quick look at it this week - hopefully it's an easy fix... I haven't tried yet. So if any one here has already figured out how to correct it, or what the issue is, that'd save me a lot of valuable time :)
     
  19. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    is there a way to get the fingerIndex of an "OnLongPress" method call? I've been using the fingerIndex checks for all my fingerDown calls, but am really missing this parameter in "OnLongPress" method calls. I'd appreciate any assistance.
     
  20. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    OnLongPress is the event for the "global" default long-press gesture, which means that it only gets called when exactly 1 finger is down and performing a long-press. If you need to access the fingerIndex, you should use the OnFingerLongPress event instead (which is the per-finger version of OnLongPress).
     
  21. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    @Spk to the rescue yet again. You've got some of the best support in the Asset Store! Thank you :)

    I cant recommend FingerGestures enough to anyone looking to add touch support to a unity project, grab it now in the Asset Store!
     
  22. A_Rival

    A_Rival

    Joined:
    Jun 22, 2008
    Posts:
    3
  23. kootenay

    kootenay

    Joined:
    Feb 8, 2011
    Posts:
    116
    So I've installed Finger Gestures plugin, attached this tap.js script below to my skier object and referenced that object with the animationComp2 variable properly, but can't get this animation to work. The animated object is a child of the object this script is attached to, but I reference that Child object using the var in the Inspector. There are no errors, and when I click anywhere with my mouse, "Spread Eagle" appears fine with the position of the mouse, but the skier won't animate... I've had no issues animating it elsewhere in the project.

    Any ideas what I could try or what I'm doing wrong?


    var animationComp2:Animation;

    function OnEnable()
    {
    // subscribe to the global tap event
    FingerGestures.OnTap += MyFingerGestures_OnTap;
    }

    function OnDisable()
    {
    // unsubscribe from the global tap event
    FingerGestures.OnTap -= MyFingerGestures_OnTap;
    }

    // Our tap event handler. The method name can be whatever you want.
    function MyFingerGestures_OnTap( fingerPos : Vector2 )
    {
    Debug.Log( "Spread Eagle!" + fingerPos );
    animationComp2.CrossFade("SpreadEagle",0.2);

    }
     
    Last edited: Apr 23, 2012
  24. skullthug

    skullthug

    Joined:
    Oct 16, 2011
    Posts:
    202
    I'd recommend updating the introduction wiki soon, or at least cover dealing with PickObject in regards to how to setup a scene and deal with taps on a specific object. I wasted a LOT of time in the examples trying to figure out how they were even managing to call PickObject, and also to realize it's apparently not a global function(?) as I expected and I had to basically construct it myself.
     
  25. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    @skullthug: thank you for the feedback. I've got a bunch of tutorials on the way that will cover this in detail. I'm also planning on introducing an utility class exposing that kind of convenience method.
     
  26. frojona

    frojona

    Joined:
    Dec 15, 2011
    Posts:
    3
    Hi Spk,

    I recently bought you plugin and I'm trying to implement it into my project.Here's what I'm doing:

    Finger drag - left - right/ X axis - Rotates object depending on drag velocity
    Finger drag - up - down (y-axis) Moves object on an axis depending on drag velocity

    Before implementing your plugin i made a vector 3 from: -Input.GetAxis ("Mouse X"), -Input.GetAxis ("Mouse Y"), 0

    The problem with this method occurs when you have more than one finger on the screen because it calculates an average mouse speed between the two fingers and what I want is to get a separate velocity value from each finger. Is there a way I can get this using the drag function?

    Thank you for a great plugin it has opened some new opportunities for my game :)

    Jon
     
  27. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Hi Jon,

    If you use the OnFingerDragXXX events instead of OnDragXXX, you will be able to get separate drag data for each finger independently. Is that what you are currently using?

    Alternatively, you can access each individual finger data via FingerGestures.GetFinger(x) method where x is the desired finger index. From there, you can access the finger's current and previous position, allowing you to compute move delta/velocity.
     
  28. frojona

    frojona

    Joined:
    Dec 15, 2011
    Posts:
    3
    Thank you for a quick reply.

    I'm using OnFingerDrag

    Can you type a short example of how I could get the velocity. I'm new to programming and some things seem over my head.
    Is it be best to update the velocity code in the OnFingerDrag function or keep it refreshing in the Update function?

    Jon
     
  29. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    You can get the instant velocity like this:

    void OnFingerDragMove( int fingerIndex, Vector3 fingerPos, Vector2 delta )
    {
    Vector2 velocity = delta / Time.deltaTime;
    }

    Which would give you the x and y instant velocity when the finger is dragged. If you need an averaged velocity, then you can use OnFingerDragBegin() / OnFingerDragEnd() to reset your counters.

    Let me know if you need more help.
     
  30. frojona

    frojona

    Joined:
    Dec 15, 2011
    Posts:
    3
    Hi Spk,

    It works now, but I encounter one problem when I press, drag and stop the velocity value does not go to zero if i keep pressing without moving. Do you have any idea why this happens and how to work around it?

    Thank you for all the help! :D
     
  31. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Yeah it's because OnFingerDragMove is not called when the finger is idle.
    You've got several options that I can think of:
    1) Use the OnFingerStationary event to be notified when the finger stopped moving, and reset the velocity
    2) Compute finger velocity from every frame from your Update() method, using
    finger = FingerGestures.GetFinger(x) (where x is the index of the finger you want to track the velocity of - e.g. 0)
    delta = finger.Position - finger.PreviousPosition
    velocity = delta / Time.deltaTime;
     
  32. matis1989

    matis1989

    Joined:
    Mar 23, 2011
    Posts:
    162
    Hi,
    Iam use this script:
    Code (csharp):
    1. function OnEnable()
    2.     {
    3.         FingerGestures.OnFingerDown += FingerGestures_OnFingerDown;
    4.     }
    5.  
    6.     function OnDisable()
    7.     {
    8.         FingerGestures.OnFingerDown -= FingerGestures_OnFingerDown;
    9.     }
    10.    
    11.     function FingerGestures_OnFingerDown( fingerIndex : int, fingerPos : Vector2 )
    12.     {
    13.         if(show_menu == false){
    14.         show_menu = true;
    15.             }
    16.     }
    17.    
    18.    
    19.     function OnGUI(){
    20.     if(show_menu == true){
    21.  
    22. if (GUI.Button(new Rect(10, 10, 150, 100), "Add gravity")){
    23.                 gameObject.AddComponent("Gravity");
    24.             }  
    25.  
    26.         if (GUI.Button(new Rect (310, 10, 150, 100), "Close")){
    27.             show_menu = false;
    28.             }
    29.         }
    30.     }
    This work excellent on one game object but when I add this code to two object it open GUI twice. Is here any way how to open GUI just once for that taped object and add script just for that one?

    EDIT: This look like what I need but I don't know how to convert it to js:
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [AddComponentMenu( "FingerGestures/Toolbox/Tap" )]
    5. public class TBTap : TBComponent
    6. {
    7.     public int tapCount = 1;
    8.  
    9.     public bool RaiseTap( int fingerIndex, Vector2 fingerPos, int tapCount )
    10.     {
    11.         if( tapCount != this.tapCount )
    12.             return false;
    13.  
    14.         print ("tap to object: "+ gameObject.name);
    15.         return true;
    16.     }
    17. }
     
    Last edited: May 2, 2012
  33. thebas81

    thebas81

    Joined:
    May 11, 2012
    Posts:
    2
    Hello, I need to implement a slash effect, like the swipe but the finger movement should start outside the object. The direction is not important. Is it possible? Maybe should I use the OnFingerMove gesture?
    Thanks
     
  34. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    You can use either OnFingerMove or OnFingerDragMove. The dragMove will offer you a bit more options such as move tolerance radius.
     
  35. matis1989

    matis1989

    Joined:
    Mar 23, 2011
    Posts:
    162
    can you please convert this code to js for me?
    Code (csharp):
    1. using UnityEngine;
    2.  
    3. using System.Collections;
    4.  
    5.  
    6.  
    7. [AddComponentMenu( "FingerGestures/Toolbox/Tap" )]
    8.  
    9. public class TBTap : TBComponent
    10.  
    11. {
    12.  
    13.     public int tapCount = 1;
    14.  
    15.  
    16.  
    17.     public bool RaiseTap( int fingerIndex, Vector2 fingerPos, int tapCount )
    18.  
    19.     {
    20.  
    21.         if( tapCount != this.tapCount )
    22.  
    23.             return false;
    24.  
    25.  
    26.  
    27.         print ("tap to object: "+ gameObject.name);
    28.  
    29.         return true;
    30.  
    31.     }
    32.  
    33. }
    thanks a lot
     
  36. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
  37. matis1989

    matis1989

    Joined:
    Mar 23, 2011
    Posts:
    162
    I have 10 more scripts in js and I need have acces to scripts values by your FingerGestures so js version is best way for me
     
  38. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    I suspected so ;) Then it'll probably save you a lot of time to simply move them to the "Plugins\FingerGestures" folder. This is a "unity trick" to make C# scripts accessible to javascript. That's why the core FingerGesture scripts are located there as well.
     
  39. thebas81

    thebas81

    Joined:
    May 11, 2012
    Posts:
    2
    Thank you William, it worked ;)
     
  40. matis1989

    matis1989

    Joined:
    Mar 23, 2011
    Posts:
    162
    @Spk: Thanks one problem si solved - I can acces js values from C# BUT I have the same problem with show_menu as in first script. When I have two game objects with this function - one with GUI function and one without - it doesnt matter on which object I click GUI open. How to do that? Sorry for stupid question but Iam realy despair.:)
    Thank you for answer.
    EDIT: Iam so stupid I forgot change script on second one gameobject.:)
    Thank you again.
     
    Last edited: May 12, 2012
  41. ratjar_games

    ratjar_games

    Joined:
    May 13, 2012
    Posts:
    17
    Hi Spk, by the looks of things its a great tool and will save a lot of time now and in projects to come, I've purchased finger gestures but due to your wiki/documentation not being complete/being revamped I'm having a little trouble getting started. To have several different objects be rotated via 2 fingers could i attach the pinch rotate script to them and then just remove all references to pinch? or is there something in the toolkit I'm missing? just want to make sure I'm not going the complicated way about things. :p
     
  42. Bugfoot

    Bugfoot

    Joined:
    Jan 9, 2009
    Posts:
    533
    Hi Jacob,
    Have you tried the "getting started" tutorial?

    As for rotating different objects, it kinda depends how you want it to work. If you use the pinch gesture, it's probably a good idea to have an initial "selection" step where the user has to tap the object in the scene that he wants to rotate using the pinch gesture.

    As to how to implement this, right now there is no toolkit wrapper script for the pinch gesture, so you'll have to follow the steps outlined in the "Method A" of the tutorial, using the OnPinchBegin, OnPinchMove and OnPinchEnd events (instead of the drag ones).

    Also, if you have some suggestions on some introduction documentation material that you think would have been useful for you to get started smoother, please let me know. I'm still working on updating the documentation, and while it's a bit slow, i'm adding new stuff there pretty often.

    Let me know if you need more assistance on this.
     
  43. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440
    Hi Spk,

    Just started using FG, its great :)
    Have you looked any more at using it on Windows 7 touch tables? I have seen some of the previous posts including Dave's which tells you how to use TUIO but it doesn't seem to work for me. Alternatively can you suggest a way to change the Drag camera behaviour so it doesn't need 2 fingers? I am currently able to pivot the camera and zoom, using the touch table but a 2 finger drag does not work.
    I still need the pivot and zoom behaviour through so mapping it to a single finger would not work :(

    I was thinking of using the centre of the screen for pivot and the edges for drag, what would be the best way to do this using your framework?

    Thanks again

    Karl
     
  44. davebuchhofer

    davebuchhofer

    Joined:
    Nov 9, 2007
    Posts:
    126
    I guess that's at least 3 people who didn't get it working from my explanation, while i was trying not to post too much code that didn't belong to me, so going to expand and show some context for the changes:

    So the uniTUIO CE rig works by way of creating an adapter class for UnityEngine.Input named Input, which forwards the 'touch' checks to the TUIO system and everything else to unitys default input engine, so first thing is that all the case UnityEngine.TouchPhase.*'s need to be changed to case TouchPhase.*

    so:
    Code (csharp):
    1.  
    2. //line 11:
    3.             Touch touch = GetTouch( finger );
    4. //instead of
    5.             UnityEngine.Touch touch = GetTouch( finger );
    6.  
    7. //same with lines 36/39/42
    8.                 case TouchPhase.Began:
    9. //instead of:
    10.                 case UnityEngine.TouchPhase.Began:
    11.  
    12. //and on line 63
    13.     Touch nullTouch = new Touch();
    14. //instead of:
    15.     UnityEngine.Touch nullTouch = new UnityEngine.Touch();
    16.  
    17.  
    18.  
    Code (csharp):
    1.  
    2.     void UpdateFingerTouchMap()
    3.     {
    4.         for( int i = 0; i < finger2touchMap.Length; ++i )
    5.             finger2touchMap[i] = -1;
    6.  
    7.         for( int i = 0; i < Input.touchCount; ++i )
    8.         {
    9.             int fingerIndex = Input.touches[i].fingerId; //this can be an arbitrary number in tuio.. it increments per hit
    10.                 finger2touchMap[i] = fingerIndex; //lets record the index
    11.         }
    12.     }
    13.  
    and also the return type and index for the GetTouch:
    Code (csharp):
    1.  
    2.     Touch GetTouch( Finger finger )
    3.     {
    4.         int touchIndex = finger2touchMap[finger.Index];
    5.         if( touchIndex == -1 )
    6.             return nullTouch;
    7.         return Input.touches[finger.Index];
    8.     }
    9.  

     
  45. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440

    Thanks Dave, I will give this a try tomorrow.
     
  46. ratjar_games

    ratjar_games

    Joined:
    May 13, 2012
    Posts:
    17
    Hi William, right I have it all working brilliantly and beautifully, really great job with the plugin. I noticed that site where people have uploaded free copies of FG and you made a comment, i'm glad you did or I would have, its not like your a massive corporation. Anyways all the best with the product.

    Just one thing though, because obviously FG's Input touch system is the way it is, how would I go about checking what object has been touched? (at the moment i can rotate the target object from pinching anywhere on the screen), I need it to only work if i touch certain objects, for instance:


    Code (csharp):
    1.  
    2. if (touchedObject.tag == "rotatableObject"){
    3.     canRotate = true;
    4. }
    5.  
    6.  
    any help would be great! thanks a lot!
     
    Last edited: May 15, 2012
  47. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440

    Hi Dave, Still no luck. I cant see why you have removed the UnityEngine namespace from Touch? They still refer to UnityEngine, do i need to add an other Using statement? I can see no reference to a Touch class in uniTUIOCE.
    Code (csharp):
    1.  
    2.  
    3. using UnityEngine;
    4. using System.Collections;
    5.  
    6. /// <summary>
    7. /// The touch-screen implementation of FingerGestures for a windows 7 touch table.
    8. /// </summary>
    9. public class TUIOGestures : FingerGestures
    10. {
    11.     /// <summary>
    12.     /// Maximum number of simultaneous fingers to track
    13.     /// </summary>
    14.     public int maxFingers = 5;
    15.  
    16.     public override int MaxFingers
    17.     {
    18.         get { return maxFingers; }
    19.     }
    20.  
    21.     protected override void Start()
    22.     {
    23.         finger2touchMap = new int[MaxFingers];
    24.  
    25.         base.Start();
    26.     }
    27.  
    28.     #region FingerGestures Implementation
    29.  
    30.     protected override FingerGestures.FingerPhase GetPhase( Finger finger )
    31.     {
    32.         if( HasValidTouch( finger ) )
    33.         {
    34.             Touch touch = GetTouch( finger );
    35.  
    36.             switch( touch.phase )
    37.             {
    38.                 case TouchPhase.Began:
    39.                     return FingerPhase.Began;
    40.  
    41.                 case TouchPhase.Moved:
    42.                     return FingerPhase.Moved;
    43.  
    44.                 case TouchPhase.Stationary:
    45.                     return FingerPhase.Stationary;
    46.  
    47.                 default:
    48.                     return FingerPhase.Ended;
    49.             }
    50.         }
    51.  
    52.         return FingerPhase.None;
    53.     }
    54.  
    55.     protected override Vector2 GetPosition( Finger finger )
    56.     {
    57.         Touch touch = GetTouch( finger );
    58.         return touch.position;
    59.     }
    60.  
    61.     #endregion
    62.  
    63.     #region Touch > Finger mapping
    64.  
    65.     Touch nullTouch = new Touch();
    66.  
    67.     int[] finger2touchMap;  // finger.index -> touch index map
    68.  
    69.     void UpdateFingerTouchMap()
    70.     {
    71.         for( int i = 0; i < finger2touchMap.Length; ++i )
    72.             finger2touchMap[i] = -1;
    73.  
    74.         for( int i = 0; i < Input.touchCount; ++i )
    75.         {
    76.             int fingerIndex = Input.touches[i].fingerId; //this can be an arbitrary number in tuio.. it increments per hit
    77.             finger2touchMap[i] = fingerIndex; //lets record the index
    78.         }
    79.     }
    80.  
    81.     bool HasValidTouch( Finger finger )
    82.     {
    83.         return finger2touchMap[finger.Index] != -1;
    84.     }
    85.  
    86.     Touch GetTouch( Finger finger )
    87.     {
    88.         int touchIndex = finger2touchMap[finger.Index];
    89.         if( touchIndex == -1 )
    90.             return nullTouch;
    91.         return Input.touches[finger.Index];
    92.     }
    93.  
    94.     #endregion
    95.  
    96.     protected override void Update()
    97.     {
    98.         UpdateFingerTouchMap();
    99.         base.Update();
    100.     }
    101. }
    102.  

    UPDATE:

    Got it to work!!!! :)v:)

    You also need to add the following at the top :

    Code (csharp):
    1.  
    2. using Input = iPhoneInput;
    3. using Touch = iPhoneTouch;
    4. using TouchPhase = iPhoneTouchPhase;
    5.  
    Thanks Dave :)

    Karl
     
    Last edited: May 15, 2012
  48. ratjar_games

    ratjar_games

    Joined:
    May 13, 2012
    Posts:
    17
    By the way forgot to get back to you about your docs, the existing docs are very helpful, and I also used the sample codes and scenes to work out how to use it, not to mention your excellent support. Once you get all of those docs up I think Finger Gestures will be one of the most helpful/supportive assets on the asset store (certainly the best of its kind already) :)
     
    Last edited: May 16, 2012
  49. davebuchhofer

    davebuchhofer

    Joined:
    Nov 9, 2007
    Posts:
    126
    Karl, we must have used different unituio versions, Glad to see its working. Cheers.
     
  50. markhula

    markhula

    Joined:
    Sep 3, 2011
    Posts:
    630
    Hey Spk!

    How's it going!?
    I haven't updated my version of FG for sometime and was wondering if some kind of character recognition had yet been added?; even if it's just simple shapes and basic numbers?. I know it has been a mentioned a few times and I don't really want to trawl through all 30 pages so was just wondering :))

    Cheers