Search Unity

[RELEASED] Easy Touch

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

  1. Honikou

    Honikou

    Joined:
    Feb 18, 2013
    Posts:
    92

    My previous message was :

    Hi,

    I update easytouch,

    1. Last version of Easytouch allow user to tap on joystick and the thumb ( only the thumb) move instantly on the touch position, this feature still exist ? ( I don't talk about dynamic joystick ) by taping the background , the thumb move instant ( easy touch 3.x ) that is very important for my game.

    2. How to get the angle of the joystick ? - ok now
    where move is a Vector2
    float angle = Mathf.Atan2(move.x, move.y) * Mathf.Rad2Deg;

    Thank you for your great work
    ------------------------------------------------------------------------------


    I still waiting for this feature, I really really need it, my game is ready and I'm waiting for that to make it perfect !

    When do you want to add/backup this feature ?
     
  2. Hedgehog-Team

    Hedgehog-Team

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

    I'm on it, may be this week , or in the begining of next week
     
  3. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch 4.2 is live on UnityAssetStore : http://u3d.as/2Uo

    EasyTouchControls 1.2.0
    News features
    - No offset thumg : When this option is activated, the joystick thumb is positioned directly under the first touch.
    - No return of the thumb : When this option is activated, the joystick thumb isn't return to the center when the player relase the touch.

    These two options are available in the joystick inspector in Position & Size part.
     
  4. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Thanks for that update, it was perfect timing!

    I also had a questions about buttons. I wanted to slide back and forth between two buttons many times in the same touch, rather than pressing one, lifting my finger, and pressing the other button (stop and go buttons). I enabled the slide-in property, but it only seemed to work the first time I slid to the other button. The buttons became unresponsive after that, of course lifting my finger reset the buttons and they worked again.

    Is there anything I can do to get the button sliding back and forth working?

    Thanks!!
     
  5. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch 4.2.1 is available in AssetStore

    EasyTouchControls 1.2.1
    =======================
    - Bug fixed
    ************
    TouchPAD, DPAD, Button only take into account the first touch

    Eric
    I don't have this behaviour, can you try with the last version ?
     
  6. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
  7. Hedgehog-Team

    Hedgehog-Team

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

    I webGL doesn't work at home.Can you describe this featuree .

    EasyTouch Control uses new UI, so if you want to dynamically move the joystick, you can do it simply with EasyTouch. Look at UI example.
     
  8. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Hi,
    Thanks for the quick reply. Ive tried updating but that didnt seem to fix the button behavior.

    It could be that Ive set this up incorrectly as well. In the video, Im holding the mouse button down the entire time. It seems like after every second slide over the button reactivates. I have swipe-in set to active. The behavior I was expecting was that I could hold the button down and continue to slide up and down over each button and it would activate each time. Thanks for your help!

     
  9. Hedgehog-Team

    Hedgehog-Team

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

    I have reproduced the case, I did 't foreseeable buttons on my first test.

    Pending the update, you can do this:
    Replace the first test of function OnPointerEnter of ETCButton script
    - This line:
    if (isSwipeIn && axis.axisState == ETCAxis.AxisState.None && !isOnTouch){

    by this one

    if (isSwipeIn && !isOnTouch){
     
  10. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Works really well now, thanks for the quick solution!!
     
  11. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    I spoke too soon, works fine in the editor, when I built it for iOS the buttons stay depressed once activated and don't release.

    Thanks for any ideas!!
     
  12. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    Here is a short explanation of how the feature works with inControl:

    Go to 10:22 for draggable joystick

     
  13. Hedgehog-Team

    Hedgehog-Team

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

    Eric Bates,
    Sorry, I did not check on the final platform. I also true android. I look at it

    S.O.L.O
    I have nothing planned this order for now. But I note for later.But I have that I find this very strange feature
     
  14. Hedgehog-Team

    Hedgehog-Team

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

    A small bug has crept into the last release, the button that does not come from the back.

    Just add this line :
    pointId = eventData.pointerId;

    in the method public void OnPointerDown(PointerEventData eventData) of ETCButton script


    Code (CSharp):
    1.     public void OnPointerDown(PointerEventData eventData){
    2.  
    3.         if (_activated && !isOnTouch){
    4.             pointId = eventData.pointerId;
    5.  
    6.             axis.ResetAxis();
    7.             axis.axisState = ETCAxis.AxisState.Down;
    8.  
    9.             isOnPress = false;
    10.             isOnTouch = true;
    11.  
    12.             onDown.Invoke();
    13.             ApllyState();
    14.         }
    15.     }
    I push a release tonight
     
  15. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Hi,

    This fixes it! Thanks so much for pushing this out asap!!

    Eric
     
  16. Hedgehog-Team

    Hedgehog-Team

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

    It"s available
     
  17. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    232
    Cool, thanks again!!
     
  18. pokeking

    pokeking

    Joined:
    May 13, 2015
    Posts:
    42
  19. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Now this is a weird one, but is anyone else getting EasyTouch constantly saying it needs to be 'updated' in the download tab of the Asset Store?

    The button is always the yellow 'Update' button, despite updating and even deleting the unitypackage altogether and re-downloading.

    It's not a huge thing, but the OCD in me hates it haha!
     
  20. Hedgehog-Team

    Hedgehog-Team

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

    Pokeking
    I'm going to look at that, tomorow

    Mickyg
    Weird, there has been a lot of updates lately, but after we do not know how Unity manages this indicator. Can you tell me your bundle version ?
     
  21. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I try to update EasyTouch to the last version and I get the message:

    All assets from this package are already in your project,

    So I can't import any asset from the update.
    I had to delete the package and download and import all again.

    Absurd.
     
    Last edited: Jul 28, 2015
  22. Hedgehog-Team

    Hedgehog-Team

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

    Yes, this is the normal behavior because unity donwload the files missing from those present in your project
     
  23. Hedgehog-Team

    Hedgehog-Team

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

    The Team Hedgehog team is on vacation until August 10. The support will always be assured, but a longer delay may occur before having an answer.

    Thank you for your understanding
     
  24. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hi all,

    A few things.

    How do you get access to x and y floats on Easy Touch Joystick?
    It used to be:

    public EasyJoystick myJoystick;

    but obviously that doesn't work anymore.


    Is there a way to rotate a gameObject on both X and Y axis?


    Also, it seems that un-ticking the Visible check box doesn't work. I un-tick it and the joysticks images still show up.

    Any ideas on how to fix this?

    Thanks!
     
  25. Hedgehog-Team

    Hedgehog-Team

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

    It seems that you Always use Easytouch 3, there is a reason for this ?
     
    ShinyTaco likes this.
  26. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hi,

    Why do you say that?
     
  27. Hedgehog-Team

    Hedgehog-Team

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

    Because Easytouch is now in version 4 , and easyjoystick was replaced by easytouch control.

    The update to 4 is free
     
    ShinyTaco and Kellyrayj like this.
  28. nm8shun

    nm8shun

    Joined:
    Jul 14, 2007
    Posts:
    476
    Great set of tools.

    Is there a way to pinch scale an object - but not uniformly? I need to be able to pinch and stretch an object only along y or x (if they pinch vertically or horizontally respectively), but still recognize that a diagonal pinch is a uniform scale.
     
  29. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70

    Correct, hence the question.

    I need to access X and Y values in Easy Touch 4 as I originally posted.

    It was formerly done the way I showed in my original post.

    It doesn't mean I'm using Easy Touch 3.
     
  30. Hedgehog-Team

    Hedgehog-Team

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

    Nm8shun :
    When you do a swipe, it's a 2d gesture. The event comes with a parameter type of Gesture class , where you will have several datas about the gesture ( position, swipe lenght, delta time, etc..)

    In my example, I uses 2d data from gesture classe into 3d command. There isn't any relation between 2d and 3d, it up to you to decide how to use these datas. In my example The scale is uniform because I decide to aplly the scale value to all axes, but you can only apply it, on a single axis.

    ShinyTaco :
    With easytouch controls you have 4 ways to interact :
    * direct : you don't need to write any line of code
    * by event : you have just to give the gameobject, and the method to call. This method must a vector 2 as parameter to receive axis value
    * by input manager : this allow you get axis value relative to his axis name
    * dynmaic event :

    Let' have the look at examples, and video
     
  31. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Hi all,

    Easy Touch doesn't work. Hedgehog Team doesn't even answer simple questions regarding their product.

    Why doesnt something as simple as disabling Visible not work?

    Why doesn't Hedehog Team respond to this?

    So much time and money wasted.
     
    f1chris likes this.
  32. Hedgehog-Team

    Hedgehog-Team

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

    You asked me a question in relation to an older version, I ask you whether this is normal.Because I have users who remain in Version 3, as they do not wish to migrate to Unity 4 or 5 on the current project.

    What you confirm that you are version 4. So I expose to you the different possible method to retrieve the values of axes joystick
    post Friday at 1:50
    Generally, people confirm they understand and prefer to use a particular method, or ask me on a complementary question about a method.

    Since there are several methods to do what you want, that is why I direct you to the examples, so you can choose what seems best for your project., because the answer will depend on the method you want to use
     
    Last edited: Aug 9, 2015
  33. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    No. If you read what I said. It wasn't an older version.

    Easy Touch doesn't work.

    The images remain visible even if you tick the visible box.

    Easy Touch Joystick doesn't work.
     
  34. Hedgehog-Team

    Hedgehog-Team

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

    Are you reading what I write?
    You seemed to want to retrieve the valuers of joystick axes, but I'm still waiting for the method you want to use


    You can continue to say that EasyTouch doesn"t work, but I could never help you if you don't answer the questions I ask you. The aim is to identify what you want to do

    You talk about joystick axis , and now : "The images remain visible even if you tick the visible box. "
    I do not know what you mean, you talk about :
    * an example ?
    * what you did?
    * inpsector properties ?

    Tell me what you want to do?
    Have you tried the examples?
    Do you encounter problems with the examples?
     
    Last edited: Aug 9, 2015
  35. ShinyTaco

    ShinyTaco

    Joined:
    Sep 4, 2012
    Posts:
    70
    Easy Touch Joystick and Hedgehog Team are the king of double talk.

    Easy Touch Joystick doesn't work.

    You can't read simple posts as to why ticking or unticking a check box that is supposed to disable or enable an image.

    Easy Touch a Joystick doesn't work.

    I clearly ask how to access X and Y values of Easy Touch Joystick and I'm told that I'm using an older version of Easy Touch Joystick.

    Which, clearly I'm not.

    Read the post.

    If you took a moment of your time to properly read what my post said, you would clearly understand what I previously said.

    Previously said means, beforehand.

    I understand that English is not your first language, and respect that %100.

    But for you to go on a public forum and start spreading misleading and false information that is unfactual and incorrect is totally unacceptable to you and your product.

    Easy Touch Joystick doesn't work and Hedgehog Team spreads lies and misinformation.
     
  36. Hedgehog-Team

    Hedgehog-Team

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

    As I already told you, there are different methods for interacting with the joystick, and the response is relative to method that you want to use. And I still waiting for the answer to my question in relation to example etc ... But you do not seem to read my messages, because s you seem more interested to say that Easy Touch that does not work, rather than answer my questions :

    So I'll take into consideration that you want to use the most simple one event method & manager :

    event method from inspector
    1 - Create a script with this method :

    Code (CSharp):
    1.     public void JoystickReceiver(Vector2 joystickValue){
    2.         Debug.Log("Axis x :  " + joystickValue.x  + " / " + "Axis Y :  " + joystickValue.y);
    3.     }
    2 - Attach this script to a gameobject

    3 - Setup your joystick like that :
    upload_2015-8-10_15-29-1.png




    ETCInput manager

    1-Create a script with this method

    Code (CSharp):
    1.     void Update(){
    2.  
    3.         float x = ETCInput.GetAxis( "Horizontal" );
    4.         Debug.Log (x);
    5.     }
    2- Attach this script to a gameobject

    Horizontal is the name of the axis that you want to retreive his value, you can channge it in the inspector

    upload_2015-8-10_15-26-46.png

    There are other methods,


    Also, it seems that un-ticking the Visible check box doesn't work. I un-tick it and the joysticks images still show up.
    Do you have this behavior in example scene ?
    Do you have the last version of EasyTouch bundle ?
     
    Last edited: Aug 10, 2015
  37. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    A couple problems with the latest update. The transform locks into the layer its set at. A new control must be added and removed each time to move an element to a new depth in the transform so if I want to drag the touchpad in front of the buttons, i need to add an element and delete it before I can change the depth. The touchpad locks to the touched position when using swipe in swipe out in editor mode even when emulate key simulation is disabled. This is probably a Unity 5.1 bug since Unity is the king of bugs and sloppy updates and pretty much useless all around which is why any professional developer would laugh at anyone using it, but take a look and see if you can reproduce the problem so the children who use the Unity toy don't have problems later on. Thanks, and sorry you have to work three times harder to keep up with all the bugs in Unity.
     
  38. Hedgehog-Team

    Hedgehog-Team

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

    I just did some tests, I don't have issues that you describe with Unity 5.1.2f1.

    Do you have any other package in your project, which interact with the GUI?
     
  39. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    Nicolas, thank you for the quick response. The problem appears to be a bug in 5.0 through 5.1.2 of Unity which forcibly refreshes the UI to the most recent prefab state when in Play mode and any UI Canvas saved as a prefab contains a Slider element. This happens with any UI component and thus is not an EasyTouch error, but rather in the Unity Editor itself and is resolved by not saving any UI as a prefab and ensuring that any parent object of the Canvas is a Transform set at Vector3.zero and not a RectTransform. Thanks again for the prompt support.
     
  40. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    I'm having a problem getting any two finger samples to work on a touchscreen monitor running windows 10, it does work when holding ctrl or alt as described in the sample's text window. (just FYI not using android but windows executable)
     
  41. MrGky93

    MrGky93

    Joined:
    Feb 27, 2014
    Posts:
    281
    he is it possible to control more cameras ??
    Because there is only one direction to ...
     
  42. Hedgehog-Team

    Hedgehog-Team

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

    Sirius
    EasyTouch uses Unity API, and Unity doesn't support multi-touch under windows. I'm sorry for this bad news

    RayLeigh
    to what ?
    Can you give me more information?
     
  43. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi How can I detect a Swipe Crossing an Object?

    The floor there has a collider... so the Swipe Starts over an object.
    I have that thing wich I want to detect the direction (right, left, etc) of the Swipe crossing over it.

    OnSwipe is not working because the floor has a collider, so it doesn't start on empty.

    OnDrag doesn't work because it doesn't start on my thing.



    upload_2015-8-16_2-42-10.png
     
  44. Hedgehog-Team

    Hedgehog-Team

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

    In your case, the current gesture is a drag because as you say the gesture start over the floor.

    You have to 2 solutions :
    -1 Enable : Auto update picked gameobject in EasyTouch inspector. This option allows EasyTouch to update at each frame the current picked object, but necessarily it adds a ray cast every frame.

    -2 Test yourself if the current position is over an object with the method GetCurrentPickedObject of gesture classe.To predict any case, you could do this:

    Code (CSharp):
    1. void OnEnable(){
    2.       EasyTouch.On_Swipe += On_Swipe;
    3.       EasyTouch.On_Drag += On_Drag;
    4. }
    5.  
    6. void On_Swipe(Gesture gesture){
    7.      On_Drag( gesture);
    8. }
    9.  
    10. void On_Drag(Gesture gesture){
    11.       if (gesture.pickedObject == gameobject || gesture.GetCurrentPickedObject() == gameobject){
    12.                // Do that you want
    13.        }
    14. }
     
    daville likes this.
  45. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Ok, Thanks it works.

    What is better? to ask for GetCurrentPickedObject myself? or Set Auto Update Picked GameObject?

    or are they doing the same thing?
     
  46. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    The difference is in performance and data
    - By activating the option in the inspector, a Physic.RayCast is made in addition to each loop, and you lose the information of the selected object at the start of the gesture.

    - With the script, Physic.RayCast is performed only if you are in drag or swipe and the current object is not good.
     
    daville likes this.
  47. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Whats the best way to detect Swipes only on half the screen? like the right side of the screen?
    Are TouchPad controls suitable for that? how do I get the swipe info from the TouchPad?
     
  48. Hedgehog-Team

    Hedgehog-Team

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

    The best way is to uses EasyTouch event, you have 3 events available :
    - On_SwipeStart
    - On_Swipe
    - On SwipeEnd

    To know what area of the screen swipe execute, you should test the position relative to the size of the screen, or get the normalizes position (0-1) via the method NormalizedPosition from gesture class. The object of type gesture passed as parameter also lets you know the direction of swipe, its length, angle etc ... (Look at the documentation page 24 to learn more about the gesture class)

    Simple example

    Code (CSharp):
    1. public class SwipeHalfScreen : MonoBehaviour {
    2.  
    3.     void OnEnable(){
    4.         EasyTouch.On_Swipe += On_Swipe;
    5.     }
    6.  
    7.     void On_Swipe (Gesture gesture){
    8.  
    9.         Vector2 nPosition = gesture.NormalizedPosition();
    10.  
    11.         // Detect left part
    12.         if (nPosition.x <0.5){
    13.             Debug.Log( gesture.swipe);
    14.         }
    15.     }
    16. }

    You can also use the touchpad, but the information you can get are more rudimentary (See the example: TouchPad-Event-Input, it shows the two methods to retrieve information Via the integrated event in the Inspector. or via ETCInput class). But it gives you only delta values on 2 axes (since it is a games controller ), no length, no direction etc ...

    The choice between one or the other will be based on the complexity of the action you want to perform, and information that you need to accomplish it.

    A total control of information on gesture => EasyTouch.
    A simple action if an X or Y axis is activated => TouchPad
     
  49. Funforge

    Funforge

    Joined:
    Jun 18, 2015
    Posts:
    9
    Hi Nicolas,
    I need your help on something.

    I have a Canvas with UI elements (fullscreen pop ups, buttons, etc...). And I have 3D elements with sphere colliders on my scene, I can select them with SimpleTap gesture to do stuffs.
    But when I click on a UI button to close a UI popup and there is a 3D element under my UI button it detects a SimpleTap on my 3D element.

    I've try to use gesture.isOverGui but it doesn't work well. isOverGui is false when I click on a button that close my popup. It's like SimpleTap execute itself when the popup disapear and not when I click on the button.

    Any idea? (Please feel free to ask if you need more informations)
     
  50. Hedgehog-Team

    Hedgehog-Team

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

    Weird, by default EasyTouch doesn't send messages on the current gesture, if the touch is over a Unity UI. This means that you disable the compatibility mode, while keeping the UI element detection.

    I just made a simple test, between a button and a cube. And it works we, with this EasyTouch setup

    Code (CSharp):
    1.     void OnEnable(){
    2.         EasyTouch.On_SimpleTap += HandleOn_SimpleTap;
    3.     }
    4.  
    5.     void HandleOn_SimpleTap (Gesture gesture)
    6.     {
    7.         if (!gesture.isOverGui){
    8.             if (gesture.pickedObject == gameObject){
    9.                 Debug.Log("you touch the cube");
    10.             }
    11.         }
    12.     }
    Could you post your code?
    Do you really need to receive messages from EasyTouch when the touch is on top of UI Elements?