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

Easy Touch Controls : Virtual Controls 100% new UI

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

  1. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Hi all,
    Easy Touch controls are all virtual controller exploiting the new UI & the new event sysem :
    - Joystick
    - DPad
    - TouchPad
    - Button

    Each controller have 3 modes:
    - Direct: to animate your objects without code. Drag and drop your object and choose the axis and action (Translate, Rotate, AddForceetc ...).

    - Event: The new event system allows you to call existing functions simply by Drag & drop your object, the inspector is responsible for exposing the existing methods.

    - Input manager: To easily migrate your existing script. In 95% of cases, you just have to replace Input by ETCInput on your script

    These three modes can be combined together, to create a amazing gaming experience.

    Unprecedented options
    Depending on the nature of the controllers you have access to options
    - Dead Zone
    - Speed
    - Intertia
    - Auto stabilization
    - Clamp rotation
    - On / Off axis
    - Push over the time
    - etc...

    Unity 4.6 Powered

    Using the new UI and the new event system allows a quick and easy use asset, with low drawcall.

    Availability
    Easy Touch Controls will be available in standalone and integrated with EsyTouch. Easytouch users can already use it by simply updating their packge.

    This package will be available in the coming weeks (depending on submission time).

    Example of migrating an existing script


    Screenshots




     
    Last edited: Jan 13, 2015
    mimminito likes this.
  2. Hedgehog-Team

    Hedgehog-Team

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

    Check out the API documentation of Easy Touch Controls: Online doc
     
  3. Hedgehog-Team

    Hedgehog-Team

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

    A new video, how to create a fps camera without a line of code.
     
    mimminito likes this.
  4. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    This looks great! Awesome work, very handy.
     
  5. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Thank you, the package will be in pending review today.
     
  6. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
  7. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    How many draw calls does the FPS example have?

    Does it work well with UFPS and RealisticFPS prefab? Thank you!
     
  8. Hedgehog-Team

    Hedgehog-Team

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

    This example have 10 draw call :
    3 for the scene without gui
    5 for all button & joystick + scene
    10 for scene + button & joystick + Frame text / Main menu / Amro counter

    EasyTouchControls uses the new UI, so the draw call depends on sprite packer (Unity Pro) , and if you use single or multi sprite.

    EasyTouchControls isn't a UFPS extension. But an indivual set of virtual controls. If you can move your UFPS controller with Unity Input class , you can use EasyTouchControls with a simple migration script, Look at the video "Example of migrating an existing script"

    The various methods of integrating EasyTouchControls (Input Manager, Direct, Event, or 3 at a time), Lets move what you want the way you want
     
    eridani likes this.
  9. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    can you add a pinch zoom in/ out to rts sample. The previous easytouch did not do very well when there is pinch and twist for this camera setup.
     
  10. Hedgehog-Team

    Hedgehog-Team

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

    I think you were mistaken topic :) you want to talk about EasyTouch.
     
  11. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    yes, sorry. They were bundled together in my case. So can you please add.
     
  12. Hedgehog-Team

    Hedgehog-Team

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

    Easy Touch Controls 1.0.1 is available.

    Release notes
    - Dynamic joysticks no longer appears above a selectable UI element and no staying sticky
    - Dynamic joysticks are placed at the forefront of canvas.
    - You can authorized a dynamic joystick above touchpad.
    - The button value is correctly reset to 0 after his release on over the time mode.
     
  13. Hedgehog-Team

    Hedgehog-Team

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

    Introductory offer of $10.

    EasyTouch Controls 1.0.2 is available

    Release notes
    - The controls are properly unregister from the dictionary to their destruction.
     
  14. Hedgehog-Team

    Hedgehog-Team

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

    Easy Touch Controls 1.0.3 is available

    Releases notes
    - Fixed dynamic joystick with user defined area.
     
  15. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I need to assign a different image while a ETC button is activated. (It keeps activated till pressed again like a toggle)
    How can I access the button image by script?

    Thanks
     
  16. Hedgehog-Team

    Hedgehog-Team

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

    There aren't yet function with Input Manager, but you can access to Image component of the button.
     
  17. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I think I can't access the image component from a ETCInput (ETCbutton) object.
     
  18. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Yes, that's what I say, there is no access via the class ETCInput. But You can use simple GetComponent<Image>()
     
  19. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    It is suppossed we are using EasyTouch Controls so the button has been declared as ETCInput class...
     
  20. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    No, so you can do something like this :

    Code (CSharp):
    1. public GameObject myButton;
    2. private Image buttonImage;
    3.  
    4. void Start(){
    5.     buttonImage = myButton.GetComponent<Image>();
    6. }
     
  21. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Thanks but it doesn't work for me. (It is "UI.Image" not "Image")
    Are you going to add functions in ETCInput to access the button Image by script?
     
    Last edited: Feb 10, 2015
  22. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Yes Image is UnityEngine.UI class.
     
  23. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    There is a bug in the last update: the Dynamic Joystick is not working.
    Replacing the "ETCJoystick.cs" file with previous version solved the problem.
     
  24. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    This bug is fixed in EasyTouchControl 1.0.5. or EasyTouch Bundle 4.0.8

    These versions are available since only a few hours.
     
  25. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Another issue:

    Many times when deactivating a joystick with ETCInput.SetControlActivated, when it is activated again the axis is not reseted to zero. It is happening with Dynamic joysticks.
    Is there a way to reset by code the joystick axis?
     
  26. Hedgehog-Team

    Hedgehog-Team

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

    This is its value, or visually it is not reset ?
     
  27. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Its value. It happens with Dynamic joysticks.
     
  28. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Ok, I 'm going to look at this
     
  29. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Angl_m
    Can you tell me how you made, because I can't recreate the bug. thank you
     
  30. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I have a Canvas with two groups of Input controls for two different game modes (on-foot and flying).
    Both have Dynamic joysticks for player movement.
    When in fly mode the fly joystick is activated and the on-foot joystick is deactivated and vice versa.
    When I go from one game mode to the other mode, I activate the corresponding Input group and deactivate the other, then, many times, the newly activated joystick is not reseted to zero value so the player is in movement without any joystick press.
    I have to touch the screen and take control of the joystick to reset it.

    It doesn't happen always but it would be very useful to reset the axis value to zero by code with a simple function.
     
    Last edited: Mar 4, 2015
  31. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Any chance to have a function for reseting the axis value to zero?
    I think it would be enough to fix the issue.
    I repeat I have noticed the problem only with Dynamic joysticks.
     
  32. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
  33. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    He disabled the canvas, not the control, but for your case I will be very interesting by a simple example, because I can't do the case
     
  34. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    The case is the same. When deactivating the control the axis is not always reseted to zero with Dynamic joysticks.The issue not always happens but it is present.
    I think the posibility to reset by script the axis value to zero would be very useful. I'm pretty sure new customers using the asset will encounter this issue.
     
  35. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Ok, I'm thinking to do an update next week, I'm going to add this function in ETCInput class, although I would have preferred to find the bug
     
  36. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Thanks.
     
  37. ctknoxville

    ctknoxville

    Joined:
    Oct 1, 2013
    Posts:
    32
    Does this work with playmaker?
     
  38. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    There isn't specific interface between EasyTouchControl & playmaker (somme asset exist for EasyTouch ).

    But Playmaker allows you to create custom action (
    ), so you can create a script and link it to playmaker.

    EasyTouchControl uses new unity events system or his own input manager class.
     
  39. Hedgehog-Team

    Hedgehog-Team

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

    A new version is available on the store 1.1.0 :

    Release notes
    • EasyTouchContols 1.1.0
    - News
    - You can bind keys on control axes, to simulate the behaviour on Unity Editor or on standalone

    - New static function to reset axis ETCInput.ResetAxis(String axisName)

    - Bug fuxed
    - Visible property works correctly for DPAD​
     
  40. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I have noticed a curious issue with the last update. When pressed the Space key all the present ETC buttons in the scene are activated (like if they have been pressed)...:confused:
     
  41. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Yes, because the spacebar is assigned by default to the simulation for a button
     
  42. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Can be deactivated ?
     
  43. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    Yes on the inspector or assign another key.


     
  44. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Ok, thanks.
     
  45. Domotos

    Domotos

    Joined:
    Mar 19, 2015
    Posts:
    2
    Hi!
    I would like to know if you are planing to add support of static functions for keys.

    I'm using a script to manage inputs, and it is mostly using Input.GetKey function. That woud be awesome to have all my Input.GetKey functions working with ETCInput.GetKey :)

    Also, is there a way to edit the joystick script so that I can assign it to 4 axis instead of 2?

    Thanks
     
    Last edited: Mar 19, 2015
  46. Hedgehog-Team

    Hedgehog-Team

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

    The last version include a key simulation for each axes and buttons, that you can allow on standalone build. ...:)

    Why do you need 4 axes on a joystick ?
     
  47. Domotos

    Domotos

    Joined:
    Mar 19, 2015
    Posts:
    2
    Thanks for your reply. I will try to look into your new feature.

    I need 4 axes on my joystick because that is how the input script works. It had been written so that X+, X-, Y+ and Y- are distinguished. This may sound weird and useless but I need the joystick to be mapped to 4 axes and not 2 axes.

    Right now, I have a virtual joystick mapped to X+ and Y+. It works well, but X- and Y- are not working because I can't map them to the virtual joystick.

    I'm trying a workaround but it does not work. I tried duplicating the virtual joystick and map it to X- and Y- but apparently, I can not press two joysticks at the same time.

    I hope that you understand, sorry if I made some english mistakes.
     
  48. Hedgehog-Team

    Hedgehog-Team

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

    I don't really understand because a joystick has a horizontal axis and a vertical axis (thus 2 axes) , the axis value varies between -1 and 1. 0 is equal to the center position for an axis.

    For horizontal axis -1 = full left / 0 = center / 1 = full right
    For vertical axis -1 = full bottom / 0 = center / 1 = full top


    Tell me rather what you can not do with the joystick
     
  49. Don-L727

    Don-L727

    Joined:
    Aug 6, 2014
    Posts:
    38
    I recently bought your Easy Touch bundle and Easy Touch to Playmaker add-on. Had issues with Unity 4 so i reinstalled with Unity 5. Got abit farther but It wont load the asset into the scene. Suggestions? Easy Touch issue 2.png
     
  50. Hedgehog-Team

    Hedgehog-Team

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

    With EasyTouch 4, you just do a right click in the hierachy to create what you want. (Look at the documentation page 5;))