Search Unity

[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
    Hi all,

    Sorry for the delay, but once again the Unity Forum notifications are no longer functional.

    Pretender
    EasyTouch controls uses Unity UI for graphics layer. You can't use NGUI with EasyTouch Controls

    Skyboard
    EasyTouch uses the platform directive to use the touch screen or mouse simulation.

    Unity don't have any directive to detect Android TV :-(. The only solution would be to remove from source code Android directive when you compile for that platform, hoping that Unity correctly interpreted the click for this platform


    Juicymangoz
    I just did the tests, and everything works correctly. You must enabled 2D Collider in Automatic selection chapter in the inspector, and don't forget to setup layer too
     
    Last edited: May 18, 2015
  2. Avalon3D

    Avalon3D

    Joined:
    May 19, 2015
    Posts:
    25
    Hello, I have seen your Easy Touch controller, and think that is very good, interesting and better than others available, but before buying it I want to know if this can have a 3D crosshair, I mean that it can be independent the crosshair of the camera, as I want to be able to move the camera without moving the crosshair at the same time.

    I have seen that there is a FPS demo where you can move the camera look to any position in 3D space, BUT the problem with FPS is that the crosshair always follows the camera center, and you can´t move the crosshair freely.

    I have a view from inside the back of a truck viewing to outside, and have a rotating shotgun, so I want that the shotgun can move to shoot freely independent from the camera view, and so I can look up and down or right left without having to move also the weapon.

    Thanks
     
  3. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch & EasyTouch control are touch manager and virtuals controls package. There is no crosshair management.

    The display of the crosshair will be based on what you are going to do based on feedback of virtual controls or gestures.
     
  4. Avalon3D

    Avalon3D

    Joined:
    May 19, 2015
    Posts:
    25
    Interesting to know that this Easy touch does not have any crosshair management, so then the controls that moves the camera in Easy touch have no relation and independent from any crosshair?

    I mean that if the Easy touch does not have crosshair management, what is needed to manage the crosshair to move it independently of the camera?

    You can not use the touch controls with a joystick to move the crosshair ? as it happens on some mobile games

    Sorry that I do not know nothing about scripting

    Can you please explain a little more what you mean that the crosshair will be based on the feedback of virtual controls?

    Thanks
     
  5. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    I'm a little confused by your question. It is for you to manage the display, compared to what you desire.

    EasyTouch informs you of gestures which takes place on the touch screen. EasyTouch controls indicates the values of the controls axis.

    It is for you, based on all informations, to displays the crosshair, place your players etc ...

    For example if you want to control a turret with a joystick
    -Depending on the X axis of the joystick, you'll rotate your turret. and raise or lower the barrel depending on the Y axis.
    - You will manage the camera as you want (fixed, mobile etc ...)
    - And if you want to move the crosshair according gun turret you can for example:
    *Make a projection of the 3D position of the line of sight, to the screen for the 2D GUI​
     
  6. Avalon3D

    Avalon3D

    Joined:
    May 19, 2015
    Posts:
    25
    Sorry for the possible confusion, as I am a beginner and do not know much about Unity, so then is my own problem and mistake that do not know about this topic

    It has been my mistake to think that as there is already include a crosshair in the demo scene below, so I thought wrongly that as crosshair management was already included and part of Easy Touch. So, if it is not included, do you know any other crosshair management available that may be compatible with Easy Touch?

    Or maybe I should also use a second camera, or an external camera manager for this to be possible?

    The reason I asked this is that I have seen the Easy Touch Controls demo scene

    https://dl.dropboxusercontent.com/u/8514696/Asset Store/EasyTouchControls/Demo01/Demo01.html

    And here there is a touchpad fullscreen that moves the camera to wherever you want and also moving the weapon and the crosshair to follow this movements, and of course this is right because is an FPS demo, and this is how the FPS games work, but I was asking if it is possible to make the same thing without the weapon and the crosshair following the camera so you can move only the camera, and then if wanted you would move the weapon with the joystick

    The Joystick of the demo scene moves the player and the camera fron and back and sideways as it is normal and usual on a FPS, but of course does not move the crosshair because in FPS is fixed in center. So I wonder if it would be possible to have a flexible crosshair movement independent from the camera that can be controlled with the joystick and is not kept at the center.

    By the way what is the difference between the full Easy Touch 4 and the external Easy Touch controls?
    I have seen that Easy touch 4 includes inside the Easy Touch Controls

    Thanks
     
    Last edited: May 20, 2015
  7. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Hi, I checked all of my objects and setting and have exactly what you have stated above, but still no response to touches. If I switch the Collider to a 3D one, it works fine. So I don't understand what the issue could be. I'm using 2dBoxColliders on my objects.
     
  8. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Can EasyTouch recognize two specific gestures at the very same time?
    For example:

    Bush.jpg

    I have these two Bushes. When I tap them BOTH at the same time, they both shall play there ParticleSystem.

    Would that be possible? Also would this work with Presses, too, not onl Taps?
     
  9. Skyboard_Studios

    Skyboard_Studios

    Joined:
    Jul 20, 2013
    Posts:
    51
    Thanks for the reply! Seems for the androidTV I have been implementing input using the EventSystem as I have yet to test the removing of the android directive.. I will when I have time...

    So I guess my next question is this.. I have been thinking of switching to the webGL port and before I get to heavy into development I was wondering if the EasyTouch system is WebGL friendly?

    Thanks again!
     
  10. Counter0

    Counter0

    Joined:
    May 26, 2015
    Posts:
    2
    How Can I get PickedPosition?

    EasyTouch.cs Line 1570 to 1575.

    Code (CSharp):
    1.     if( Physics.Raycast( ray, out hit,float.MaxValue,mask ) ){
    2.                         pickedObject.pickedCamera = touchCameras[i].camera;
    3.                         pickedObject.isGUI = touchCameras[i].guiCamera;
    4.                         pickedObject.pickedObj = hit.collider.gameObject;
    5.                         return true;
    6.                     }
    This Code Have a Raycasting.
    But, Why Gesture/PickedObject doesn't have a Filed PickedPoint ?
     
  11. Tbaggi

    Tbaggi

    Joined:
    Aug 4, 2012
    Posts:
    14
    Hi!

    I have a problem with Dynamic Joystick & Android export.

    When I do an On_LongTap event, I set my dynamic joystick to enabled to move the camera in my game. When this event ends, I disabled my joystick.
    This works fine on Unity Editor but on my Android device, I have to put 2 fingers on the screen to see my dynamic joystick and use it. It's like the first finger is not detected by Easy Touch, same problem with On_Touch events.

    Someone with the same issue? My code is really basic, OnEnable, OnDisable and OnDestroy with LongTapStart and LongTapEnd.
     
    Last edited: May 27, 2015
  12. Hedgehog-Team

    Hedgehog-Team

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

    juicymangoz
    Do you have a skype account ?

    BTStone
    Yes you can, EasyTouch raises event for each finger.

    Skyboard
    EasyTTouch uses Plattform directive to allow touch screen or mouse, on webGL EasyTouch will use mouse

    Counter 0
    EasyTouch raise event relative to gesture on the touch screen, each event come with parameters like touch position, object picked etc.... (look at You have to register to the event that you want, and test the properties of Gesture classe.

    for example
    Code (CSharp):
    1. void OnEnable(){
    2. EasyTouch.On_TouchStart += On_TouchStart;
    3. }
    4.  
    5. public void On_TouchStart(Gesture gesture){
    6.     Debug.Log( "Touch in " + gesture.position);
    7.      if (gesture.pickedObject != null)
    8.            Debug.Log( pickedObject.name);
    9. }
    TBaggi
    Do you use joystick from EasyTouch or your own ?
    Can you show me your EasyTouch script
     
  13. Tbaggi

    Tbaggi

    Joined:
    Aug 4, 2012
    Posts:
    14
    I use the joystick from EasyTouch.
    He is unactivated and unvisible when the scene starts.

    Here is my code:
    Code (CSharp):
    1. // Subscribe to events
    2.     void OnEnable(){
    3.         EasyTouch.On_LongTapStart += On_LongTapStart;
    4.         EasyTouch.On_TouchUp += On_TouchUp;
    5.     }
    6.     // Unsubscribe
    7.     void OnDisable(){
    8.         EasyTouch.On_LongTapStart -= On_LongTapStart;
    9.         EasyTouch.On_TouchUp -= On_TouchUp;
    10.     }
    11.     // Unsubscribe
    12.     void OnDestroy(){
    13.         EasyTouch.On_LongTapStart -= On_LongTapStart;
    14.         EasyTouch.On_TouchUp -= On_TouchUp;
    15.     }
    16.  
    17.     public void On_LongTapStart(Gesture gesture){
    18.         if (gesture.fingerIndex == 0){
    19.             ETCInput.SetControlActivated("Joystick Camera", true);
    20.         }
    21.     }
    22.  
    23.     public void On_TouchUp(Gesture gesture){
    24.         if (gesture.fingerIndex == 0){
    25.             ETCInput.SetControlActivated("Joystick Camera", false);
    26.         }
    27.     }
     
  14. Hedgehog-Team

    Hedgehog-Team

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

    Ok, I understand better.

    First by default EasyTouch doesn't raise Event over Unity GUI element, this why you need two finger on your device. (Yu can change this in the inspector)

    But do you know that can create a dynamic joystick without to write a script ? You just have to change the joystick type to dynamic
     
  15. Tbaggi

    Tbaggi

    Joined:
    Aug 4, 2012
    Posts:
    14
    1/ Where exactly in the inspector,sorry I can't find it.

    2/ Yes but I need the dynamic joystick only when I hold my finger for few seconds no immediatly when I "On_TouchDown" it.

    Thanks for your help btw. :)
     
  16. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    You have several choice.

    1 = Enable or disable the UI detection
    2 = Enable or disable UI compatibility
    => Enable EasyTouch doesn't raise event when finger is over UI , there is another message (look at the documentatioin)
    => Disable EasyTouch raise event , with data about the UI element under the touch

    Try the example UI Compatibility

     
  17. Tbaggi

    Tbaggi

    Joined:
    Aug 4, 2012
    Posts:
    14
    I've try to enable and disable UI Detection and UI Compatibility but I still need to put 2 fingers on screen to have my joystick.
    Here is my hierarchy. I've just the previous script I've posted on my Main Camera nothing else.
    lol.png
     
  18. Hedgehog-Team

    Hedgehog-Team

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

    I have to test in this case, but what is strange is that it works in the editor.

    I suppose you touch the screen where your joystick is ?
     
  19. Counter0

    Counter0

    Joined:
    May 26, 2015
    Posts:
    2
    Hmmm.. Thanks.

    I didn't Talk about Detail.

    I arleady know About Screen Position.
    << gesture.position : Vector2 >>

    I want to know About 3D Position.
    << World Space Picked Position >>

    Answer Plz....
     
  20. Hedgehog-Team

    Hedgehog-Team

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

    3D position in accordance with a 2D position is relative to a distance of depth. The gesture class offers the following methods: (Documentation page 24 & 44)

    public Vector3 GetTouchToWorldPoint(float z)
    Description
    Transforms the current touch position from screen space into world space.
    The z position is in world units from the camera.

    public Vector3 GetTouchToWorldPoint(Vector3 position3D)
    Description
    Transforms the current touch position from screen space into world space.
    position3D is a the destination world position, from that will be computed the length from the camera
     
  21. Hedgehog-Team

    Hedgehog-Team

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

    For TBaggi
    I managed to have the operation you want:

    With this script:
    I replaced SetControlActivated by SetControlVisible & Joystick is set to no visible in the inspector

    Code (CSharp):
    1.     void OnEnable(){
    2.         EasyTouch.On_LongTapStart += On_LongTapStart;
    3.         EasyTouch.On_TouchUp += On_TouchUp;
    4.     }
    5.     // Unsubscribe
    6.     void OnDisable(){
    7.         EasyTouch.On_LongTapStart -= On_LongTapStart;
    8.         EasyTouch.On_TouchUp -= On_TouchUp;
    9.     }
    10.     // Unsubscribe
    11.     void OnDestroy(){
    12.         EasyTouch.On_LongTapStart -= On_LongTapStart;
    13.         EasyTouch.On_TouchUp -= On_TouchUp;
    14.     }
    15.    
    16.     public void On_LongTapStart(Gesture gesture){
    17.         if (gesture.fingerIndex == 0){
    18.             ETCInput.SetControlVisible("Joystick Camera", true);
    19.         }
    20.     }
    21.    
    22.     public void On_TouchUp(Gesture gesture){
    23.         if (gesture.fingerIndex == 0){
    24.             ETCInput.SetControlVisible("Joystick Camera", false);
    25.         }
    26.     }
    You must replace the function OnPointerEnter of ETCJoystick.cs by this one
    Code (CSharp):
    1.     public void OnPointerEnter(PointerEventData eventData){
    2.  
    3.         eventData.pointerDrag = gameObject;
    4.         eventData.pointerPress = gameObject;
    5.         OnPointerDown( eventData);
    6.  
    7.         if (joystickType == JoystickType.Dynamic && !isDynamicActif && _activated){
    8.             eventData.pointerDrag = gameObject;
    9.             eventData.pointerPress = gameObject;
    10.  
    11.             isDynamicActif = true;
    12.         }
    13.  
    14.         if (joystickType == JoystickType.Dynamic &&  !eventData.eligibleForClick){
    15.             OnPointerUp( eventData );
    16.         }
    17.  
    18.     }
     
  22. Tbaggi

    Tbaggi

    Joined:
    Aug 4, 2012
    Posts:
    14
    Yeah! It works fine. Thanks for the awesome support! :)
     
  23. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hello
    i own that awesome asset but i struggle to do a specific task using easy joystick, is there a way to rotate and translate a gameobject at the same time using the joystick on a specific axis , right now i have only one option rather translate or rotate, but not at the same time.any idea how to achieve this?
    thanks
     
  24. Hedgehog-Team

    Hedgehog-Team

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

    You can do that with direct action, but you can create your own script with a functionwith Vector2 in paramter that you call from event part of the joystick
     
  25. November

    November

    Joined:
    Oct 16, 2013
    Posts:
    7
    i want to get joystick area in screen.i find three variables about it, reservedAreas, reservedVirtualAreas, reservedGuiAreas.but i dont understand them. can you explain this to me? thank you very much.
     
  26. Hedgehog-Team

    Hedgehog-Team

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

    It seems that you are still using EasyTouch 3. There is a reason for you to stay in Version 3 ?
     
  27. cursed1cursed1

    cursed1cursed1

    Joined:
    Jun 30, 2013
    Posts:
    18
    hi,
    i use unity 5.02 and latest easy touch
    my problem is i dont detect any gameobject with collision

    capsule
    character controller,collider and rigidbody
     
  28. Hedgehog-Team

    Hedgehog-Team

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

    Weird, few questions :
    * Are the examples work?
    * Do you have setup automatic selection in the inspector ?
     
  29. cursed1cursed1

    cursed1cursed1

    Joined:
    Jun 30, 2013
    Posts:
    18
    in the inspector enable auto select =true
    sory for my bad english
    exxamples work
    but i dont see collision detect code
    i use joystick
     
  30. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    I think there was some confusion between functionality of EasyTouch EasyTouch and EasyTouch Controls.

    Can you describe me what you want to do ?
     
  31. cursed1cursed1

    cursed1cursed1

    Joined:
    Jun 30, 2013
    Posts:
    18
    i control capsule with joystick
    when my capsule touch cube
    or
    sphere
    unity send me message you touch cube or sphere
    i want detect cube or sphere
    how?
    oncollision not work
     
  32. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch controls just move your object or your character controller. After for collision detection you must apply the rules imposed by Unity.

    * To detect whether a collision, it is necessary that oner of the two objects has a rigidbody
    * The collision between layer must be enabled in physic manager
     
  33. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Hi Hedgehog!
    I've a setup where I need to use both swipe and drag on object. Picture it like this, first user starts dragging a cube around and then continue the gesture with a swipe (without ending the touch) to rotate it. Is this possible?
    Thanks!
     
  34. Hedgehog-Team

    Hedgehog-Team

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

    Yes it is.
     
  35. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Thanks! Could you give an example how to do that? I've currently done it by storing the action time and then compare float time if it's a swipe or drag. It kinda works but the problem is if user holds finger on object and then deside to swipe insted of start dragging it obviously won't work. What would be the best way of doing this? ;)
     
  36. Hedgehog-Team

    Hedgehog-Team

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

    I misunderstood what you want. If I summarize, you would initially move an object and rotate it without releasing the touch between the two actions ?

    How do you detect the moment when it is necessary to rotate the object?
     
  37. ilesonen

    ilesonen

    Joined:
    Sep 11, 2012
    Posts:
    49
    Thats ok, thanks! Rotating would happen when user makes a swipe gesture. User drags object around then continues to a swipe gesture (without lifting a finger) and cube will rotate. Touch will end after the swipe.
    This rotating cube is just an example so you could try to picture what I need. Another good example would be iPads home screen. You know, If you have several screens, you can start drag a screen and then make a swipe gesture to move to a another screen. So, basically I just need to detect when drag changes to a swipe. Let me know, if this don't make any sense to you, I could try to make some example scene?
    Thanks Nicolas!
     
  38. Hedgehog-Team

    Hedgehog-Team

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

    Here the difference between the drag and swipe :

    Swipe = when there isn't any pickable objet on touchstart
    Drag = when there is a pickable object objet on touchstart

    As you can see, this is the same gesture, which depends on the presence or absence of an object.There is no transition between the two messages.

    In what you describe, I've never seen it unconditionally:
    - Either the user drag the object in an area => When the object is in the area we can rotate it
    - Either the user must release the key. =>

    But it must necessarily a condition for detecting the transition
     
  39. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Question : I just noticed, what is this "upgrade price" thing I see in Asset Store?
    Is update in the future not free?
     
  40. Hedgehog-Team

    Hedgehog-Team

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

    No, normally it was to give the opportunity to anyone who bought EasyTouch controls to migrate to EasyTouch 4.X, but it seems that there is a small problem.
     
  41. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    240
    hi all, i have problem with easy touch, i have mfps kit multiplayer with player1 and player2, and other game fps kit 2.0 multiplayer and all 2 games use photon , plzz help me to add this player on easy touch over the network
     
  42. Hedgehog-Team

    Hedgehog-Team

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

    That is rather vague as question. EasyTouch allow to manage gesture on a touchscreen and virtuals controls. This is the result of the actions you'll do with EasyTouch which should be managed on the network and not Easytouch itself.

    If you move an object with a vwith a virtual control, you will not send control information, but the object's position.
     
  43. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    240
    im sorry but easy touch 4 not working with best fps game 2015 MFPS and FPS KIT 2.0, if anyone has implement this buttons on this game plzz send me msg and help me
     
  44. Hedgehog-Team

    Hedgehog-Team

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

    I suppose that would integrate virtuals control with these FPS pacakge. These two packages are no longer available in asset store, but I'll assume that they remain compatible with unity 5.

    These two packages have their own player management, so you can not simply add a virtual control and move the player, with out take into account what they did in their script.

    There are two solutions :
    1 - If the authors have provided an API to control the player, you must use it by calling the functions via the event system of controls.

    2- If there is no API, you must change the script to replace the commands like Input.GetMouse etc, for those available for virtual controls ETCInput ...
     
  45. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Nicolas, the issue with VirtualControlInput gameobject is not solved in the last update. ETCSingleton.cs continues creating a new VirtualControlInput gameobject when exiting play mode and they are not deleted so you finish with a lot of VirtualControlInput instances in the scene.

    I have the current last version of EasyTouch.
     
  46. Hedgehog-Team

    Hedgehog-Team

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

    You have donwload the versionwith Unity 5.0.1 ?

    Can you send an exemple scene, because I don't have the case anymore ?
    Or describe to me how to reproduce the case.
     
    Last edited: Jun 30, 2015
  47. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I'm using Unity 4.6.6 because Unity 5 has many compatibility issues in my current project.
    The case happens (not always, about 50% of the times) when exiting play mode, so if you are frecuentlly testing the changes in the scene, at last you finish with a bunch of VirtualControlInput instances.
    (Maybe it is related to activating or deactivating in runtime some Easy Touch controls)
     
    Last edited: Jun 30, 2015
  48. Hedgehog-Team

    Hedgehog-Team

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

    The version for Unity 4 is no longer maintained, anyway Unity will remove all the package version 4 for purchase in september (they remain downloadable for people already bought the successors).

    I am sending you a PM with the fixed sources contained in the latest version 5 for Unity.
     
  49. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Ok, thanks.
    I hope you will continue supporting Unity 4 users. ;)
     
  50. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    The support is indirect, because EasyTouch 4 requires a minimum of Unity 4.6 for the new UI, except that is was uploaded with Unity 5 , there is no difference. But we are obliged to follow what Unity done

    So you can download the version for Unity 5 and extract the sources.