Search Unity

Easy Touch Controls : Virtual Controls 100% new UI

Discussion in 'Assets and Asset Store' started by Hedgehog-Team, Jan 11, 2015.

  1. Don-L727

    Don-L727

    Joined:
    Aug 6, 2014
    Posts:
    38
    I still think it has something to do with Unity 5. I had to re-import 3 times and completly close out of Unity to see it when i right clicked, but still no Tool option at the top. In addition to deleting and re-importing the Playmaker add on.
    All in all it looks like it works now, just alittle annoying, but it seems to be Unity not Easy Touch.
     
  2. Hedgehog-Team

    Hedgehog-Team

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

    There isn't tool menu with EasyTouch 4, All options are in GameObjet menu....

    So if you have a tool menu, it's mean that you use EasyTouch 3.X, that isn't really commpatible with Unity 5. The update to EasyTouch 4 is free, juste download the package from your assetstore account.
     
  3. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Hi there, thank you for Easy Touch - it's saved me a lot of work recently - but I do have one small issue I hope you'll be able to help me with...

    I'm using a dynamic joystick but the joystick is appearing offset from where my thumb touches the screen. EasyTouchIssue.jpg
    Am I missing something obvious?

    E.
     
  4. Abelabumba

    Abelabumba

    Joined:
    Jan 14, 2015
    Posts:
    45
    What are the differences between easy touch 4 and easy touch controls?
    Edit:

    While I'm here my I can ask my follow up questions as well, I guess. Behold the art:


    What I want is the user to start swiping anywhere in the green start zone and letting go withing the red end zone, then I want to get a float showing me how fast he went from the upper border to the lower one. Is this possible? If he starts in green and ends in white nothing should happen, same if it's white -> red.

    Edited again: Actually, the above would be cool, but as long as I can simply get a trigger for "player put down finger in green, held and swiped down until he was in red, then released" that would work, too. For both cases he doesn't have to release it from within the red zone; as long as he went the full green > white > red it would be fine, so technically it's not about zones but about the two borders transitioning from/to white, I guess.
     
    Last edited: Mar 30, 2015
  5. Don-L727

    Don-L727

    Joined:
    Aug 6, 2014
    Posts:
    38
    Thank you Hedgehog team for clearing that up.
     
  6. Hedgehog-Team

    Hedgehog-Team

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

    Suminell
    Weird, I don't have this behavior. Have you the possibility to send me a test case ?

    AdelaBumba
    * EasyTouch Controls is a virtual controller library
    * EasyTouch 4.0 is a gesture manager librayr, EasyTouch controls is included into EasyTouch 4

    For you need, I'm thinking EasyTouch is preferable. Because you will have more control with the touch position
     
  7. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Of course - attached is a stripped down scene with just the camera, easy touch canvas and event system. When built and run it should demonstrate my problem. Oh, i'm testing it on an iPhone 4.

    Thanks,

    E.
     

    Attached Files:

  8. Hedgehog-Team

    Hedgehog-Team

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

    You issue come fram that you don't setup your canvas render mode to screen space - overlay.
     
  9. Suminell

    Suminell

    Joined:
    Feb 24, 2014
    Posts:
    15
    Great! That's fixed it. Many thanks for your help.

    E.
     
  10. nupur1

    nupur1

    Joined:
    Apr 9, 2015
    Posts:
    5
    I am planning on getting this asset, and am curious if it works well, is optimal, supported, and works
     
  11. Hedgehog-Team

    Hedgehog-Team

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

    Very strange question, I say yes to all:)
     
  12. Fire77

    Fire77

    Joined:
    Apr 25, 2015
    Posts:
    1
    How do you use animations? I mean, you can translate and rotate but the mesh is completely still with no running/walking position
     
  13. Hedgehog-Team

    Hedgehog-Team

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

    Animations management can be complex, simply wire it on different events sent from joysticks.
     
  14. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Hedgehog,

    I found the following bug:

    Your ETCDPadInspector editor script, is missing the line for t.gameobject.name. The result is you can't access the D-Pad control using SetControlVisible or SetControlActivated. I fixed it by copying the line from one of your other editor scripts.

    I also have a question about using SetActive on the control or the EasyTouchControlsCanvas. Why would I not just use SetActive to enable or disable the controls or the entire canvas to improve performance when the controls are not needed instead of individually deActivating the controls using your static functions. I noticed when I try to disable a control or the EasyTouchControlsCanvas using SetActive, I get the following error when I stop playing the scene: "Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)"

    Thanks
    Allan
     
  15. Hedgehog-Team

    Hedgehog-Team

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

    Weird, what you say, corresponds to the corrections of the last verson 1.1.0.
    Did you download this version?
    ,
     
  16. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I have the most recent version of EasyTouch from the Asset store and it contains EasyTouchControls. The Release Notes for EasyTouchControls in my package says 1.1.0.

    Allan
     
  17. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Just to double check, I just now created a new Unity project and downloaded the latest EasyTouch from the Asset store. The release notes for EasyTouchControls indicates that it is at version 1.1.0 however the ETCDPadInspector.cs is missing the line to have a control name. (t.gameobject.name) It's simply not there.

    Hope that helps.
     
  18. Hedgehog-Team

    Hedgehog-Team

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

    Actually it was an oversight on my part. But it isn't a specific property, it's just the a shortcut on the property name of the gameobject. (you can change his name like other gameobject in you scene). This doesn't prevent you from using the setVisible SetControlActivated property etc ...

    I don't use SetActive on control, when you use the function SetControlActivated, it sets a boolean that is tested to know the control must react relative to the touch. that all. You have this specific function because may be you don't want to desabled all your controls in the same time, and You have this error, because you SetActive, and not the SetControlActivated.

    Furthermore it allows to interact with a control without going through a comprehensive reference on the canvas that contains it.

    Thank you for your feedback, I'm going to add suppport for unity SetActive on Canvas.
     
  19. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I'm using both the D-Pad and the TouchPad in a game. With 30 levels, it would save me a lot of time if I could hookup the events related to those controls in code during startup in each level instead of manually in the inspector in each level.

    I'm familiar with using Button.onclick.AddListener in order to add events to GUI buttons but I'm not sure how to access the ETCInput objects and add Listeners to the various events you have in the inspector.

    Is there a way to do that and if so could you provide a short code example.

    Thanks
    Allan
     
  20. Hedgehog-Team

    Hedgehog-Team

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

    You want to dynamicaly register to a specific event ;

    Code (CSharp):
    1. public class Demo : MonoBehaviour {
    2.  
    3.     public ETCJoystick myJoystick;
    4.  
    5.     void Start () {
    6.         myJoystick.onMove.AddListener( CallBackExample );
    7.     }
    8.    
    9.  
    10.     void CallBackExample(Vector2 move){
    11.         Debug.Log( "Cool " + move);
    12.     }
    13. }
    But there is more simple, just using the public functions of the class ETCInput

    Code (CSharp):
    1. public class Demo : MonoBehaviour {
    2.  
    3.        void Update(){
    4.                float translation = ETCInput.GetAxisSpeed("Vertical") ;
    5.                float rotation = ETCInput.GetAxisSpeed("Horizontal") ;
    6.                transform.Translate(0, 0, translation);
    7.                transform.Rotate(0, rotation, 0);
    8.         }
    9. }
    Look at EasyTouchConstrols_APIDocumentation.pdf to know all function availables
     
  21. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Thanks.

    Your code example was exactly what I needed. it was much simpler than I was making it.

    Allan
     
  22. craigfortune

    craigfortune

    Joined:
    Nov 2, 2014
    Posts:
    2
    Hello,

    I've just started to use this today. I'm having difficulties when trying to use more than one control at a time, it's like only a single touch point allowed at a time. Pretty bad for use on multi-touch devices! :)

    For example, say you have a button and a joystick control on the screen. The joystick on the left, the button on the right. You hold the joystick to the left, then tap the button. The joystick will shoot over to the right, as the additional touch has controlled the joystick as well as the button.

    If this is a known problem or am I missing an option somewhere?

    Thanks in advance,
    -Craig
     
  23. Hedgehog-Team

    Hedgehog-Team

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

    I suppose that you use Unity Remote. Unity Remote doesn't support multi touch with the new Unity UI, and EasyTouch controls uses the new UI :-(

    If you want to test your application, ie:

    *Use the binding keys on the axes of your controls
    * Made a final compilation on your plateform
     
  24. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I discovered an interesting bug while trying to activate and deactivate controls during runtime. I've read in previous posts that Easy Touch Controls do not support activation and deactivation using gameobject.SetActive. The problem is even though it doesn't support the use, if you do use it, it results in a strange bug.

    If you Deactivate a control during runtime, a gameobject called VirtualControlInput is instantiated into your scene when you stop gameplay. These objects are not destroyed at any time so they continue to accumulate in number in your scene. Additionally if you stop gameplay or try to load a new scene, you will get the following error: Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)

    You may want to be very clear in your documentation that it is not recommended to activate and deactivate the control objects because of these problems. Instead you should use Activated and Visible properties on the control scripts during runtime.

    Thanks
    Allan
     
  25. Hedgehog-Team

    Hedgehog-Team

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

    I found the cause to the problem, the update will be available soon (on the Unity server will respond properly).
     
  26. Hedgehog-Team

    Hedgehog-Team

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

    A new version is available on AssetStore:

    EasyTouchContols 1.1.1
    ======================
    - Bug fixed
    ************
    - VirtualControlInput gameobject no longer stay alive after you stop playmode after to have desactivated a control
     
  27. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I reported this issue with VirtualControlInput some time ago.
     
    Last edited: May 28, 2015
  28. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    this is fixed now with the last version 1.1.1
     
  29. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch Controls 1.2.0 is available. Check the new webplayer

    EasyTouchControls 1.2.0
    =======================
    - News for joystick
    *******************
    - 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.
     
  30. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Hedgehog,

    I've discovered some strange behavior with Touchpad. It may be a feature or it may be a bug so I thought I would report it. Either way it's a behavior I am looking to get rid of.

    I am using Touchpad as a means to detect touching the screen to make a player jump. Everything appeared to work great until I accidently touched the screen with 2 fingers at the same time. And my Jump method called from the On Touch Start Event was called twice simultaneously. If I touch with 3 fingers, it is called 3 times. It occurred to me that this may be a feature of multi-touch or it may be a bug. If it is a multi touch feature, is there a way for me to turn off multi touch on the Touchpad. Additionally, if it is multitouch it seems that there should be some way to designate the number of fingers and how you may want 1, 2, 3 touches to fire different actions.

    At first, I thought it was a problem with my code or my scene so I deployed Touchpad-Event-Input example scene to my iPad and eliminated all Events, Horizontal, Vertical Axis on the Touchpad except for the On Touch Start event and then added a debug log to the method that event calls. Sure enough, 1 touch calls it once, 2 fingers calls it twice and 3 fingers calls it 3 times. Of course this multiplies my jump depending on the number of fingers you are using. Since it's actually calling the method as independent events, there is no way in code in my jump method to detect number of jumps.

    My primary request would be a way to turn off multitouch on just the TouchPad. I was hoping to use the entire screen to detect a jump and Touchpad works perfectly in that regard.

    I'm using Unity 4.6.6f2 and deploying to an iPad3 through Xcode 6.3.1.

    Thanks
    Allan
     
  31. Hedgehog-Team

    Hedgehog-Team

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

    This is not a feature, I look at this. Thank you for your feedback
     
  32. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Is there a way for the end user to move the controls to wherever desired, during gameplay? Such as in an options screen. Thank you
     
  33. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch controls uses the new Unity UI, so you can change their position with a script as you will change the position of other UI Element.
     
  34. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Hedgehog,

    So I thought while you are looking for a solution on the Touchpad bug, I would use a button instead.
    Unfortunately it does the exact same thing. It will fire all associated events simultaneously based upon the number of fingers touching the screen. It's pretty easy to test.
    - Go to Button-Event-Input scene.
    - I want the jump capability to be over the entire screen, so I stretch the button over the entire screen by using the Anchor Preset in the Rect Transform in the bottom right (stretch vertical, stretch Horizontal). This also just makes it easier to use 3 fingers in the test. In my case, I would swap out the button sprites for transparent textures so the button is invisible but none of this really matters. We just want the button to be big enough to use 2 or 3 fingers.
    - Put a debug.log in any of the methods in ButtonUIEvent.cs that are called from the events on the button. I used the On Down event and placed a debug log in the void Down method in ButtonUIEvent.cs.
    - Build and Run to Xcode, deploy to iPad 3.
    - touch the screen with 3 fingers and you'll see the Dubug.log text in the debug area in xcode appear 3 times. So it's firing the method 3 times independently.

    Hope that helps

    Allan
     
  35. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I also ran my test on a standard Unity GUI Button. I added a Pointer Down Event to the button to call my Jump method since On Click does not work for tapping to jump.

    Anyway, it also fires the event and calls the method the same number of times as the number of fingers that touch the screen. So if I touch with 3 fingers, the Pointer Down event is called 3 times. This occurs if you use On Click as well so the event type does not matter.

    This appears to be the way Unity events with their new GUI system work.

    I've been trying to get information on EventSystem components to see if there is a way to control this multi touch stuff but have had no luck. I wonder if there is a setting on Event System, Standalone Input Module or Touch Input Module where you can adjust the number of times an event is fired relative to the number of fingers touching the screen.

    Or is this just a Unity bug?

    Allan
     
  36. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    EasyTouch does the same thing. I just tested the OneFinger scene, scaled up the Touch Me sphere and deployed to Xcode. Touch the Touch Me sphere with 3 fingers and it fires the On_TouchStart method 3 times.
     
  37. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch Control 1.2.1 is available on assetStore

    Bug fixed
    ************
    TouchPAD, DPAD, Button only take into account the first touch. asyTouchControls 1.2.0
     
  38. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Hedgehog,

    I'm sorry to make this so complicated.

    I'm using EasyTouch 4 which includes EasyTouch Control. I downloaded the update from the Asset Store dated July 9th and nothing changed as far as I could tell. I ran the same tests and still had multiple event firings.

    So I have not tested your fix however my concern with hardcoding only a single touch on specific controls is it may prevent those controls being used with other controls on the screen at the same time. Of course this depends on how you implemented the fix.

    What method did you use to limit the event from firing more than once with multiple finger touches?

    In my case I am using the DPad for character movement on the left side of the screen and the Touchpad to define an area for jumping on the right. In this scenario, you still need to be able to have 2 touches on the screen. My short term fix was to simply place the following into my Jump() method called from the OnTouchStart event on my TouchPad:
    if (Input.touchCount == 1 || Input.touchCount == 2)

    This way my touchpad will only execute my jump action with either a single touch or two touches. I need 2 touches because the game is played by touching the DPad for movement and touching the touchpad for jumping at the same time.


    Allan
     
  39. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Weird, do you use Unity 4 or Unity 5 ?

    Because the update is for Unity 5. In september the package for Unity 4 won't be available on assetstore ( cleanup done by Unity Team)
     
    Last edited: Jul 9, 2015
  40. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Hedgehog,

    I'm on Unity 4.6.7 which is why I'm using EasyTouch 4 with the included EasyTouch Controls package. I'm updating an older game with newer monetization schemes and including touch controls to replace tilt for character movement. I'm done, just doing last minutes testing when I noticed the multitouch problem with jumping. The whole game is physics based so I didn't want to switch to Unity 5 until I start my next game. That would likely add many months to rebuild everything for Unity 5's new physics system.

    The other thing I can do is just purchase and download EasyTouchControls in Unity 5 and look at the changes you made to the code. Can you tell me which classes you changed? I can probably figure it out if I know where to look for your changes.

    I'm a pro subscriber so I have Unity 5.

    Thanks
    Allan
     
  41. Hedgehog-Team

    Hedgehog-Team

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

    You don't need to purchase, just do that :
    - Instal Unity 5.X (in other folder, to have Unity 5 & Unity 4 on the same computer)
    - Donwload EasyTouch with Unity 5 (Unity gives you the version based on your Unity editor version)
    -Extract source code, and replace them in your Unity 4 project
     
  42. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Good point. Why didn't I think of that? :)

    Thanks
     
  43. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    That worked!

    Tons of thanks for the amazing support!

    Allan
     
  44. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    ;) you re welcome
     
  45. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Do you plan to provide a script with that functionality? I would like the user to be able to place the joysticks wherever they want by going into an options screen and dragging and dropping the controls to their desired spots
     
  46. Hedgehog-Team

    Hedgehog-Team

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

    You can now update your EasyTouch Controls licence to EasyTouch 4.X for $25

    http://u3d.as/2Uo
     
  47. Olszaq

    Olszaq

    Joined:
    Oct 15, 2013
    Posts:
    1
    Hello,
    Any idea how to use dynamic joystics with another canvas behind it? When I have only joysticks canvas everything is ok. But when I have second canvas with HUD dynamic joystics doesn't work.
     
  48. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Because the HUD normally doesn't need user interaction, try setting the HUD canvas to not interactable, disabling or removing the Graphic Raycaster component.
     
    Olszaq likes this.
  49. Hedgehog-Team

    Hedgehog-Team

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

    Thank you Angel.

    As Angel says, usually for a HUD no need it to be interactable, so remove the component Graphic Raycaster component. Indeed the dynamic joystick tests whether position is not above a clickable component. But if you are in case, that means that you have a component that takes the whole screen, as a panel or image ...

    However if you need a second canvas with clickable elements, you can do this :

    Canvas : Is you new canvas witout Graphic Raycaster component
    NotClickable : a simple RectTransform with all your unclickable element as child
    Clickable : a simple RectTransform with Graphic Raycaster component (But it should not be a component that takes the whole screen)
     
    Olszaq likes this.
  50. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch Controls 1.2.3 is alive in assetstore http://u3d.as/b7W

    - Bug fixed
    ************
    * The controls are corretly reset (value & position) after their deactivation
    * The Controls no longer return their value after their deactivation
    * The controls respond correctly to SetActive on their gameobject

    - News
    ******
    * VituralControlInput is renamed InputManager
    * You can now add InputManager from GameObject menu.

    Nicolas