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] Easy Touch

Discussion in 'Assets and Asset Store' started by Hedgehog-Team, May 8, 2012.

  1. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Ok thank you

    Nicolas
     
  2. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Nicolas,

    "In the next release there will have an option to use EasyTouch with NGUI"

    How will this integration work in actual coding. Is there a small snippet for previewing.

    Thanks.
     
  3. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    NGUI already manage touch on his panels.

    You will have an option to not receive EasyTouch events when you tap on NGUI panel

     
  4. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Very nice.
     
  5. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Nicolas,

    I had a look at the problem with the Flash export and found the problem. It looks like the Flash export does not recognize the Keycode.LeftAlt nor Keycode.RightAlt. I tested this on both Mac and Win and the Flash problem is the same.

    I made a test using the Keycode.LeftShift and the twisting and Pinching works.

    The debug info on the bottom works on the "Twist me" and "Drag me" spheres.

    Here is the link to the exported Flash files. https://www.dropbox.com/sh/nzxvoppo6csksv5/upu_vqz1-D
     
  6. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    I was right, may be a Unity bug ! but I use the key ctrl too ...
     
  7. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Hello Nicolas :)

    On devrait être en mesure d'utiliser tactile facile avec un GUITexture, oui? J'ai simplement ajouté ce script à la texture, mais ne semble pas fonctionner. Quand je ajouter ce script à mon caractère, il fonctionne, mais pas à une texture.

    One should be able to use easy touch with a GUITexture, yes? I simply added this script to the texture but doesn't seem to work. When I add this script to my character it works but not to a texture.

    Code (csharp):
    1.  
    2.  
    3. #pragma strict
    4.  
    5. function Start () {
    6.  
    7. }
    8. function On_TouchStart( gesture:Gesture){
    9.     Debug.Log( "Touch in " + gesture.position);
    10. }
    11. function Update () {
    12.  
    13. }
    14.  
    15.  
    16.  
    17.  
     
  8. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Nicolas, it seems that from your code the keycode.Ctrl is used to detect the second finger and not the twist or pinch. Below is my test code, I changed your keycode.LeftAlt to keycode.LeftShift.

    // Get the position of the simulate second finger
    public Vector2 GetSecondFingerPosition(){

    Vector2 pos = new Vector2(-1,-1);

    if ((Input.GetKey(KeyCode.LeftShift)|| Input.GetKey(KeyCode.RightShift)) (Input.GetKey(KeyCode.LeftControl)|| Input.GetKey(KeyCode.RightControl))){
    Debug.Log("firstloop="+ bComplex);
    if (!bComplex){
    bComplex=true;
    deltaFingerPosition = (Vector2)Input.mousePosition - oldFinger2Position;
    }
    pos = GetComplex2finger();
    return pos;
    }
    else if (Input.GetKey(KeyCode.LeftShift)|| Input.GetKey(KeyCode.RightShift) ){
    Debug.Log("2ndLoop Alt="+ bComplex);
    pos = GetPinchTwist2Finger();
    bComplex = false;
    return pos;
    }else if (Input.GetKey(KeyCode.LeftControl)|| Input.GetKey(KeyCode.RightControl) ){
    Debug.Log("3rdLoop Ctrl ="+ bComplex);
    pos =GetComplex2finger();
    bComplex = false;
    return pos;
    }

    return pos;
    }
     
  9. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Joccoco :

    If you use javascript, EasyTouch sends the messages to GameObjet with the EasyTouch script (because with javascript you can't uses delegate). If you want to redirect messages to another gameobject you must use this method static

    / / / <summary>
    / / / Sets the receiver for EasyTouch other event.
    / / / </ Summary>
    / / / <param Name='receiver'>
    / / / Gameobject.
    / / / </ Param>
    public static void SetOtherReceiverObject (gameobject receiver) {
    EasyTouch.instance.receiverObject = receiver;
    }

    But in case, your idea would be to make a button, wait a few days because EasyButton happens with the next release.It will be as easy as EasyJoystick




    Rocki
    The easiest way, I will make setting keys in inpesctor with an indication for compilations flash
     
  10. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Ok cool :) the new version will work with 3x version of Unity?
     
  11. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Yes, I will release in 3.X
     
  12. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,459
    Sounds like an easy fix.
     
  13. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Discover the new easytouch extension EasyButton, that will be available in the next release

     
  14. hbey

    hbey

    Joined:
    Apr 9, 2013
    Posts:
    9
    $??.PNG

    Hi ,There are many gameobject which I have to select one to control by using Joystick .
    But how I can Change transform ("Joystick X to")?????when I write like this,Unity3D alert ("NullReferenceException.....")

    Code (csharp):
    1. public EasyJoystick temp;
    2.     void SetJoystickTransform()
    3.     {
    4.         Transform player = GameObject.FindGameObjectWithTag("Player").transform;
    5.         if (player)
    6.         {
    7.             temp.XAxisTransform = player;
    8.             temp.influenced = ?
    9.             temp.axisinfluenced = ?
    10.         }
    11.     }
    Thanks ^^^^^^^^^^^^^
     
    Last edited: Apr 9, 2013
  15. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi hbey,

    You want to specify which gameobject will be influenced by joystick X axis by script ?

    The joystick Y will be fixe , but not the X axis ? because in you script, you assign the same gameObject

    Why do you not set the member influenced wxisinflunced ?

    Can tell me more about your goal ?
     
  16. hbey

    hbey

    Joined:
    Apr 9, 2013
    Posts:
    9
    $??.PNG

    Thanks all the same.
    I have fixed this by myself.I have forgot drag joystick object into my script .
    And then I can select which one can be controlled by using Joystick .
    public EasyJoystick temp;
    void SetJoystickTransform()
    {
    Transform player = GameObject.FindGameObjectWithTag("Player").transform;
    if (player)
    {
    temp.XAxisTransform = player;//Select player
    }
    }
     
  17. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Of course if you don't your joystick variale :D

    What do you mean by this ?
     
  18. hbey

    hbey

    Joined:
    Apr 9, 2013
    Posts:
    9
    There are many NPC .Player can select one of them and control it's position by using joystick .So I have to find out which NPC player want to control by its tag.
    And also I write some tutorial of Joystick and paste the buy link to some forums,hope someone can buy your plugin.
     
  19. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Ah ok,


    Code (csharp):
    1. And also I write some tutorial of Joystick and paste the buy link to some forums,hope someone can buy your plugin.
    :D thank but do you watch the video, and do you look at the examples in the package ?
    what you missed that compared to existing videos and documentation before I release the next verison ?
     
  20. hbey

    hbey

    Joined:
    Apr 9, 2013
    Posts:
    9
    Yes I have already watched it,but it's 3D game tutorial,I am using joystick to create a 2D game in Unity3D.
     
  21. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    So for you, it will be good, if it will be an 2D example ?
     
  22. hbey

    hbey

    Joined:
    Apr 9, 2013
    Posts:
    9
    Sorry,haven't finished it yet.Just start this project since this morning.
     
  23. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Ni Nicolas,

    I was wondering if you could help? How can you pass the values from Easy Touch Joystick to along? For example if you wanted to pass them into an if statement?

    Thank you.
     
  24. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi ShinyTaco

    You want to test the joystick value ?

    You have several way to do this. You can use Event or Direct&Event mode, that raise event with joystick values.
    Or the last one, it's to use the include mode to directly read the value from the joystick....

    Nicolas
     
    Last edited: Apr 11, 2013
  25. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    oops
     
    Last edited: Apr 11, 2013
  26. Thomas Zighem

    Thomas Zighem

    Joined:
    Nov 16, 2012
    Posts:
    2
    Hi Nicolas,

    Do you know when the next version of Easy Touch will be released, actually I'm using the 2.5.1 version (I need to experiment with the NGUI feature soon). Thanks for the job Nicolas !

    Thomas.
     
  27. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi Thomas

    soon, soon.

    I am still 3 points:

    * Optimization of swipe and drag, because as you know, reading the information from the touchscreen depends on your FPS, because Unity does not handle the touch by event.
    So when you swipe gestures very fast and very short with 25 FPS, unity only receive 2 status, start end, he did not have time to get the move stats, so EasyTouch raises an TAP event TAP ..not, a SWIPE.

    I'm thinkng have a trick to fixe this "unity miss"

    * Writing new example

    * Update the documentation
     
  28. dragonstun

    dragonstun

    Joined:
    Jan 28, 2013
    Posts:
    6
    Hello, I just wanted to give big kudos to Nicolas for developing such a great tool. I recently used it in a prototype for a project I'm working on and the client loved the user experience - most of which was only possible because of this plugin. I'm really looking forward to the next release and would recommend it to anyone as an essential tool in their Unity arsenal. ALso, big thanks for your support - it makes all the difference!
     
  29. dragonstun

    dragonstun

    Joined:
    Jan 28, 2013
    Posts:
    6
    By the way - for the upcoming release of EasyJoystick, I am hoping you will address the issue where the buttons get very small on iPads with retina display. In the current version, when I open the same build in both an iPad2 and an iPad3 - the iPad2 is incredibly small and out of place. I guess this has to do with the pixel density...
     
  30. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Thank a lot.

    Yes with virtual screen, you will no longer have this issue.
     
  31. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
  32. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    The latest version of EasyTouch has taken a little more time to release as one of our beta tester (Jorge Ramos) found a few minor bugs. As always, we strive to make quality products and have one final bug to fix. Thank you for your patience.

    To be forgiven, here is a screenshot of the new default textures that will be delivered for joystick and buttons
     

    Attached Files:

  33. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Very nice. ;)
     
  34. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi,

    Always with a view to have quality products, if you want to be a beta tester future version (5 places), I invite you to register on our forum.

    You must be a licensee EasyTouch:

    Our forum
     
  35. gringo2012

    gringo2012

    Joined:
    Jul 6, 2012
    Posts:
    46
    Hello

    Is there a way for you to include a touch orbit script into this package?
    You drag the finger on the screen to rotate camera around an object (smooth rotate) and you can also use pinch to zoom in or out.

    I tried several scripts that exist but they either don't work right or they're not smoothly rotating around the object.
     
  36. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Is there a way to force joystick image (and joystick) to only move along 1 axis? Like a boat up/down throttle control. Thanks!


    Y at-il un moyen de forcer l'image de la manette (joystick et) pour déplacer uniquement le long de l'axe 1? Comme un bateau vers le haut / vers le bas contrôle des gaz. Merci!
     
    Last edited: Apr 18, 2013
  37. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi

    To Gringo2012
    You can already do that, simply attach your camera to an empty gameObject (the center of you orbit) and when you receive the swipe you turn this empty game object, or more simple you can use RotateArround method. i will try to make example, that I will post on our forum

    To Jococo
    It done in the next release, but I'm in late ... Go see our face book page, there is a new full all the new deature that will be present.


    I also invite you to register on our forums (look my signature)

    Nicolas
     
    Last edited: Apr 18, 2013
  38. alfchee

    alfchee

    Joined:
    Jun 14, 2012
    Posts:
    19
    Thanks to open the forum, It's so quite difficult to follow all the answers here in this thread, and may be the answer to another one helps me to.
    And I will be glad to know when the next version is available.

    Regards!
     
  39. Martin_Gonzalez

    Martin_Gonzalez

    Joined:
    Mar 25, 2012
    Posts:
    361
    Hi! Is tehre a way to change the gesture while dragging? For example i have a button, i drag it, but when i'm dragging this button another button appears (so i picke it with EasyTouch.GetCurrentPickedObject(gesture.fingerIndex);) But the problem is that the gesture.pickobjoect is the first button, and not the new one.

    Thanks
     
  40. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
  41. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
  42. EricTippett

    EricTippett

    Joined:
    Apr 1, 2013
    Posts:
    12
    Hello,

    I have just began to learn C# and Unity and I really need touch controls for my iPad game.

    Is the newest version written in C# or is it still only java?(I just need the C#)
    Will the drag up, drag down, drag right and drag left swipes work on my iPad Remote or only using a mouse?

    Also, once I download the newest version, Im not sure how to set it up. Is there a link that will show me how to set this up in my game?

    I am very new so sorry for all the questions. I just need swipe up, down, left, right and tap controls for now. When the player swipes in a certain direction, a certain action will occur on the screen.
     
    Last edited: Apr 23, 2013
  43. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi Eric Tippett,

    EasyTouch written in C# since 2.0, but you still use java with it

    I invite you to log on our forum, it will be easier to follow your problems and your questions
    Hedgehog Team Forum
     
  44. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi everyone!

    The EasyTouch release 3 will be very late, but it will be better quality.

    I applaud the work of the beta testers, without which the release 3 would be unstable "BRAVO"

    All your comments or ideas are welcome on our forum:
    http://www.blitz3dfr.com/teamtalk/index.php
     
  45. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi,

    EasyTouch 3.0 is on Open Beta for all Easytouch users...

    Go to our forum : Open beta topic
     
  46. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    Hi,

    I'm having a problem between retina/ non retina devices. Ideally, it apperas that I need to scale gesture.deltaPosition by a factor of 2 in order to get things to pan properly in my game. Is there a setting I can enable which will handle this automatically?
     
  47. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi vqt123,

    It's normal you do a factor of 2, if you base something on deltaPosition, because on retina the resolution X2 bigger.

    Can you tell me what you do with the deltaposition, maybe there is another way to do the same thing without made change for retina.

    I invite you to suscribe on our forum, it will be easier for you and me to follow your issue.
     
  48. vqt123

    vqt123

    Joined:
    Apr 16, 2013
    Posts:
    23
    I use the number to pan a camera of a 2d game and would like the camera panning to move at the same speed as the finger gesture.

    Thank you for your help.


     
  49. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi, vqt123

    Please, can you registrer on our forum to have your support.

    Thank you
     
  50. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi,

    EasyTouch 3.0 is Pending Review by Unity ....