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,

    Unity 5.3.1 handle the touchpad of TV OS as a touch screen. So you will use EasyTouch as you already done..

    It will just pick the right target platform when compiling your project.
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: I've got more questions about virtual controls;

    1. Is it possible to have 8-way d-pad? What I mean, is it possible to press empty corner between up and right to activate both up and right axis? This is always easier than physically hitting up/right at the same time.

    2. Is it possible to map output of joystick axis to some curve? I.e. instead of dead zone, have curve on which values between 0 and 1 (or -1) are mapped to? So this way it would possible to have less/more precise center area for example.

    3. Is it possible to have rectangular joystick boundary? Only then it's possible to have 1/1 output values on two axis at the same time, directly from joystick output, now I only saw circle constrained joysticks.

    Thanks in advance!
     
  3. Hedgehog-Team

    Hedgehog-Team

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

    1- Yes it is, you can already test it in the webplayer
    upload_2016-1-14_17-38-33.png

    2- No, it isn't, but it's a good idea, I take it inot account for EasyTouch 5

    3- You can have rectangular background image, but the joystick still working on a cercle.
    Sorry but I don't understand Only then it's possible to have 1/1 output values on two axis at the same time, directly from joystick output
     
  4. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: In EasyTouchControls webplayer demo, I can only see 0.6-0.7 values when I pull joystick to any corner, that's something I expect when I see circular unit values, but I must have missed option to output 1/1 in diagonal "corners" of virtual stick, I didn't see it anywhere!
    And instead of baking values from circular to rectangular output values, it would be nice to have rectangular joystick movement area - it is sometimes useful!
     
  5. Hedgehog-Team

    Hedgehog-Team

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

    The options you requested does not exist, integrate your request do not have a problem if you are able to provide me a valid formula to do it. Because to be honest I do not see how to compute a consistent value in these cases.

    A joystick with 1/1 value in diagonal, how do you compute the value relative to the stick position in other case ?
    The values are calculated relative X, Y axes and radius, this would mean that the value can be greater than >1 in other case ?

    I allow myself to ask you, because as you can imagine in 4 years of existence you the first to ask.I am always open to incorporate new features. But then frankly I do not see, sometimes things are so simple that you will not believe
     
  6. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: OK - I stop pestering you :) - One question - are updates going to be free for this product in general? For example to next major version?
     
  7. Hedgehog-Team

    Hedgehog-Team

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

    All updates , even major are version free.
     
    eses likes this.
  8. maidamedia

    maidamedia

    Joined:
    Nov 19, 2009
    Posts:
    224
    Hi, I have now the left controller working fine with my player. I also created 4 buttons for fighting and skills, starting from your FPS example scene, but I can't see the player animations work (like attack or similar). I have used the Events ( onpressed() ) calling my character function DoAttack(). Any suggestion? Thx as usual
     
  9. Hedgehog-Team

    Hedgehog-Team

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

    In this case, the first thing to do is to validate that the call to your animation function is done correctly.To do this, you just add a debug.log ("ok") in your method.

    If your method is correctly called, so the "bug" comes from it.
    -Do you test your animation script outside of a virtual control ?
    - How do you start the animations ?

    If the call does not work (which I doubt), I need to see your project, or screens shot showing me the links between objects (inspector, hierarchy)
     
    maidamedia likes this.
  10. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi there, questions about Easy Touch Controls (to anyone):

    1. What is the purpose of Joystick (for example) "Axes Properties" drop down item "Positive key" and "Negative key" ? There is no mention of these in PDF manuals, they seem to give keyboard control that works at same time as touch system.
    But it doesn't seem to work on Windows desktop build, maybe I've got wrong settings - or what is the purpose of these settings?
    Additional way to control items in editor when multi touch is missing?

    2. Should multi touch work with Unity Remote? Just tested this, ETC seems to only register one touch, similar to Unity cross platform input... this is not a hardware limit, so is there a setting for enabling multi touch or is this how it works? Not too bad as Unity Remote is so lousy anyway.

    3. What is the intended way to color joystick and button sprites? Seems like if color in Image component is changed, it will be reset in build. I think changing it from "Sprites" drop down didn't do this.
     
  11. Hedgehog-Team

    Hedgehog-Team

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

    1 - Positive key and Negative allow you to simulate the control in editor, if you want to enable this feature on desktop build you must enable this option :
    upload_2016-1-19_16-7-24.png

    2- It does not come from EasyTouch but Unity. Unity Remote doesn't support multi touch on Unity UI, and EasyTouch Controls uses the new UI. But everything works on a real build, of course

    3- EasyTouch Controls uses classical new UI Sprite, so you can the color directly from the control inspector:
    upload_2016-1-19_16-10-36.png

    or directly on the sprite inspector
    upload_2016-1-19_16-11-35.png
     
  12. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: OK, I did read some comments on Asset store that ETC works on Remote, but again, it was just comment - Anyway, Touches should work on Remote?
    I remember working with multi touch in Remote, but then again, I didn't use Input.GetAxis, I used Touches - which work IMO.
    And then the Cross platform Input - I just wonder why they disabled multi touch on purpose, maybe some compatibility thing, it was possible to hack it work on remote by few changes.
     
  13. Hedgehog-Team

    Hedgehog-Team

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

    The classical multi-touch( EasyTouch) work on Unity Remote, as single touch on UI Element (EasyTouch Controls).

    Multi-touch doesn't work only on UI Element on Unity Remote, because when you use Unity Remote , Unity considers that you are in the editor, and in this case the detection information of the multi-touch is always equal to FALSE.

    The support of multitouch on UI element wondered for a long time.
     
  14. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: Oops, forgot to comment on this; I can try to verify, but I think I did try to color buttons to red and blue (for testing purposes) directly from Image, and it came out like color for sprite was set to white (no red tone on button) when built the game for iOS. So on build it wasn't colored, in editor it worked.

    EDIT: Will test iOS later, but at least everything works OK both ways on Windows build (change image color or change color from ETC Sprite drop down). So it might be just me changing things while testing...
     
    Last edited: Jan 19, 2016
  15. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team:

    I sent you PM yesterday, but I might ask as this right here. My questions are about ET4:

    1. Can I detect two single finger gestures at once? Using code / events. For example, two swipes, one on left and another on right side of screen? To me it seems trigger component at least can only detect one 1 or 2 finger gesture at time, but do I get events for two one finger gesture in this case, like gesture A, with sideways swipe and gesture B with vertical swipe?

    2. Can I detect two, two finger swipes? I know 3 is kinda max in iOS but let's say, similarly to above, user swipes two fingers close to each other on left side and then, at same time, on right side of screen, he swipes with one or two finger - do I get the left side two finger event + another one or two finger event from right side of screen at the same time?
     
  16. Hedgehog-Team

    Hedgehog-Team

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

    1- EasyTouch sends events for each finger,even for a 2 finger gesture. (look at multi-finger examples). Each event is sent with a parameter type of " Gesture", that has the "FingerId" member, which corresponds to the unique identifier of finger.

    So you can do what you want, you just need to test the position of the touch and its identifier.

    2- No you can, Easy Touch sends two finger gesture for the first two touch. Beyond is impossible to determine couples of finger. The distance information to determine the couple is meaningless because after you start the gesture (example pinch) finger distance can be large.

    However as you receive for each finger gestures, you could do your own routine
     
  17. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team: Thank you for reply! It clears the questions with gestures.

    Another question related to ETC:

    Inconsistent event firing for simulated behaviours

    1. It's quite nice that there is quick way to directly connect axis of joystick/button to gameObjects to create some movement. However, first minute I was testing it, it felt limiting - it came to me that why not test if and how events (OnDown, OnPressed, OnPressedValue, OnUp) too would allow simulated buttons to also fire events.

    Well I noticed that it doesn't work.

    Only OnUp seem to be working.

    Quick look under the hood - seems like OnUp only has this implemented, why not for all of the items?

    Just by adding invoke for corresponding UnityEvent onPointerDown (and others too) would allow, for example calling firing bullets events using button's emulation key - how cool is that? If it's already implemented for OnUp, I see no reason why not.
     
  18. Hedgehog-Team

    Hedgehog-Team

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

    You right, the event Down doesn't fired from simulation key. But ONLY for Down Event, other events as OnPressed, OnPpressedValue, OnUp are working correctly.

    Here the new UpdateButton Method that fixe your issue (Replace in ETCButton.Cs).
    I forgot to send the message in this case.

    Code (CSharp):
    1.     private void UpdateButton(){
    2.  
    3.         if (axis.axisState == ETCAxis.AxisState.Down){
    4.             isOnPress = true;
    5.             axis.axisState = ETCAxis.AxisState.Press;
    6.         }
    7.  
    8.         if (isOnPress){
    9.             axis.UpdateButton();
    10.             onPressed.Invoke();
    11.             onPressedValue.Invoke( axis.axisValue);
    12.  
    13.         }
    14.  
    15.         if (axis.axisState == ETCAxis.AxisState.Up){
    16.             isOnPress = false;
    17.             axis.axisState = ETCAxis.AxisState.None;
    18.         }
    19.  
    20.  
    21.         if (enableKeySimulation && _activated && _visible && !isOnTouch){
    22.  
    23.             if (Input.GetKey( axis.positivekey) && axis.axisState ==ETCAxis.AxisState.None  ){
    24.                 onDown.Invoke();
    25.                 axis.axisState = ETCAxis.AxisState.Down;
    26.             }
    27.        
    28.             if (!Input.GetKey(axis.positivekey) && axis.axisState == ETCAxis.AxisState.Press){
    29.                 axis.axisState = ETCAxis.AxisState.Up;
    30.                 onUp.Invoke();
    31.             }
    32.         }
    33.  
    34.     }
    If this fix does not work for you, we could make a Skype conference because it works properly at home
     
    Last edited: Jan 19, 2016
    eses likes this.
  19. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hedgehog Team:
    Ah, OK thanks for clearing things about other events.
    I only tested down as I needed it - and did my own hack - which was the what you did :)
     
  20. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch 5 quick overview video on new features (Available February 2016). Free update from EasyTouch 4

     
    Kellyrayj, PixelEnvision and eses like this.
  21. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Good stuff :)

    And thank you for your earlier reply. Is this early or late February?
     
  22. Hedgehog-Team

    Hedgehog-Team

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

    I hope early inFebruary, what bothers me most is the addon for playmaker uses version 1.8, and this one is still in beta since very very long time

    there I am on the evolution of Easy Touch Controls :
    - Be able to use a physical joystick to test the interface
    - Added new direct mode (thirs person view for dungeon & classical)
    - Auto link control relative to a gameobject tag
    etc ..
     
  23. Hedgehog-Team

    Hedgehog-Team

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

    Look at the new features of Easy Touch Controls 2.0 included in EasyTouch 5 (coming soon)
    * Turn and Move direct action is now available.It allows you to create a quick third person as Angry Bot demo
    * Jump direct action is now available.
    * Camera follow features
    * Auto link on tag : you can use direct mode without making reference to a physical gameobject in the Inspector.
    * Dead zone : You can now chose a curve to manage the deads zones of axes.
    * New methods are exposed in input manager (ETCInput)
    * New examples
    * New prefab for quick prototype.
    * new aspect of the Inspector
     
    eses likes this.
  24. chiphuc113

    chiphuc113

    Joined:
    May 3, 2015
    Posts:
    8
    Hi all,

    I'm using easy touch 4 and use cloud build for my build but it was make an error and i can't find out a way to solve it. Have any was met this situation and can help me.

    Here is the log error i was copy from unity clout build.

    [Unity] Assets/4-Util/EasyTouchBundle/EasyTouchControls/Plugins/Editor/ETCMenu.cs(154,28): error CS1061: Type `UnityEngine.EventSystems.TouchInputModule' does not contain a definition for `forceModuleActive' and no extension method `forceModuleActive' of type `UnityEngine.EventSystems.TouchInputModule' could be found (are you missing a using directive or an assembly reference?)
    64: [Unity] Assets/4-Util/EasyTouchBundle/EasyTouchControls/Plugins/Editor/ETCMenu.cs(154,28): error CS1061: Type `UnityEngine.EventSystems.TouchInputModule' does not contain a definition for `forceModuleActive' and no extension method `forceModuleActive' of type `UnityEngine.EventSystems.TouchInputModule' could be found (are you missing a using directive or an assembly reference?)
    65: [Unity] Scripts have compiler errors.
    66: [Unity] Scripts have compiler errors.
    67: ! build of 'default-android' failed. compile failed

    Thanks all
     
  25. Hedgehog-Team

    Hedgehog-Team

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

    It seems that you use EasyTouch 4 with un supported version of Unity. Can you tell me you Unity version ?
     
  26. chiphuc113

    chiphuc113

    Joined:
    May 3, 2015
    Posts:
    8
    I'm using unity ver 5.3.1
     
  27. Hedgehog-Team

    Hedgehog-Team

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

    Do you have download EasyTouch with Unity 5.3.1 or with an older version ? Because EasyTouch 4 for 5.3.1 doesn't have the line referenced in the error !
     
  28. Sheppard_25

    Sheppard_25

    Joined:
    Jan 9, 2013
    Posts:
    10
    Hi, i am have some problems using the touchpad.
    In my scene i have a touchpad so you can rotate the camera, and also gameobjects that you can pickup touching the screen, using the easytouch-tapme script.
    The point is, if touchpad-image-raycast target is active, i can use the touchpad, but i can't pick any object, and if touchpad-image-raycast target is inactive, i can pick objects (touch on the screen) but the touchpad does not work.

    You can check it in the easytouch-simpleExamples-oneFinger example, adding a touchpad and trying to use both, (tap the sphere and use the touchpad).

    Thanks!

    EDIT: ok, turning off unity ui compatibility seems to fix the problem :D
     
    Last edited: Jan 29, 2016
  29. Hedgehog-Team

    Hedgehog-Team

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

    When Ui Compatibility is ON EasyTouch doesn't fire event when the touch is over UI Element (because UI Element already have touch management from Unity). In this case EasyTouch send new events :
    - On_OverUIElement

    By turning OF, you allow EasyTouch to fire event even if touh is over UI Element. You can now test the members isOverUi & pickedUiElement of Gesture class

    You can look at UICompatibility and UITwistPinch example ...
     
    Last edited: Jan 29, 2016
  30. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi again,

    about ETC 2.0.2. Maybe these are already asked/mentioned, here they are:

    In Unity 5.3.2 ETC 2.0.2 gives errors about:
    - Use of TouchInputModule, as both inputs are now handled by StandardInputModule...
    - Use of Application.loadlevel. Well, this is only for demo scenes, but this is replaced by SceneManager.LoadScene

    Joystick
    - In Axes properties, in both Vertical and Horizontal, below General Settings, heading is called "Direction ation". Was this supposed to read "Direction Action" maybe ?

    EDIT: Oh, and forgot - thank you for new even better version! New character demo scene is also very nice!
     
  31. Hedgehog-Team

    Hedgehog-Team

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

    Yes, I know and those are warnings, not errors. Thank you for your feed back. I will fixe fix that with a specific version for 5.3.X

    Many publisher are getting a bit fed up with the frenzy of updates of Unity. It was not the time to finish our updates, that the new minor version comes, width depricated command from previous version..

    The new version 5.4 may no longer support a lot of package because it introduces a limitation that does not exist before
     
  32. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Hi Hedgehog team,

    I am considering getting this while in the sale but after reading you post above I am wondering if it will be compatible with 5.4?

    Thanks

    doc
     
  33. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I see Easy Touch 4 is on sale but I see that Easy Touch 5 is coming out in February. Will this be a free upgrade to Easy Touch 4, or will it be a separate paid asset?
     
  34. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080

    What is the limitation that 5.4 will have that Unity didn't have before?
     
  35. Hedgehog-Team

    Hedgehog-Team

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

    I am considering getting this while in the sale but after reading you post above I am wondering if it will be compatible with 5.4?
    Off course, even if a bug is found, it will be corrected as soon as possible.

    I see Easy Touch 4 is on sale but I see that Easy Touch 5 is coming out in February. Will this be a free upgrade to Easy Touch 4, or will it be a separate paid asset?
    The update from EasyTouch 4 to EasyTouch 5 is Free, as you simply download the new version from your account.
    What is the limitation that 5.4 will have that Unity didn't have before?
    Unity 5.4 will prohibit any access to the Unity engine in the in class constructor.There is nothing serious in itself. and advocated to put it in the Awake.
    1. Constructors and field initializers will be executed from the loading thread when loading a scene.
    2. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
    But as long as the release is not gold, we can not know if it will keep or not
     
  36. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    1,021
    Thanks for the reply. Good to know.

    doc
     
  37. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
    Hi

    Is there a way of setting the initial value of the joystick? For example I am using it as a throttle so want to set axisY as -1 on start up (throttle in off position), not set to center as per usual.

    Also can I restrict the joystick thumb so it only goes halfway over the background image. Not right to the bounds of the image

    thanks
     
    Last edited: Feb 13, 2016
  38. Hedgehog-Team

    Hedgehog-Team

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

    Is there a way of setting the initial value of the joystick? For example I am using it as a throttle so want to set axisY as -1 on start up (throttle in off position), not set to center as per usual.
    You just have to set the initial position of the thumb in edit mode. Off course enabled "No return of the thumb" in the inspector
    upload_2016-2-13_10-51-23.png

    Also can I restrict the joystick thumb so it only goes halfway over the background image. Not right to the bounds of the image
    You will have this feature in EasyTouch 5, it will be release next week
     
  39. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
    Ah so simple! thanks so much
     
  40. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
  41. Hedgehog-Team

    Hedgehog-Team

    Joined:
    Feb 27, 2011
    Posts:
    1,155
    I hope tomorrow, I finished describing the little documentation about new features. ;)
     
    Kellyrayj likes this.
  42. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Ah nice :) I'm looking forward to see how it'll perform with AppleTV...
     
  43. Hedgehog-Team

    Hedgehog-Team

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

    EasyTouch 5 is alive http://u3d.as/2Uo ! Made the update from your account

    EasyTouch 5.0.0
    - Add namespace HedgehogTeam.EasyTouch;
    - Add Quick Gesture components
    - Add new syntaxe to use EasyTouch in Update method
    - EasyTouch class is now a singleton
    - Playmaker support
    - You can choose to always send swipe event during a drag
    - GetPickedCurrentObject & GetUiElemnt take an optional parmater for twofinger gesutre;
    - Gesture class exposes altitudeAngle, azimuthAngle, maximumPossiblePressure, pressure, radius, radiusVariance, touchType from Touch class
    - EasyTouch Controls 2.X


    How to migrate from EasyTouch 4.X
    You need to add alias on the namespace HedgehogTeam.EasyTouch on your existing script
    Code (CSharp):
    1. using HedgehogTeam.EasyTouch;

    EasyTouch5.PNG
     
    docsavage likes this.
  44. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121
    Hi,

    Ok so this I'm sure is such a simple question, I want to use the whole android screen to look so like you would a mouse, so i dropped on a full screen touchpad. Then on top I want a joystick to move around, but I cant get the joystick on top its hidden behind the touchpad, in your example its not but I cant figure out what I've done wrong, help ! :)

    Also can anyone tell me how to stop the view 'snapping' to where you touch your finger ? so for intance you have a scene and the view is centered, touch the phone screen at the top and the camara shoots up and snaps to your finger position, so you are viewing the sky, I want it to stay where it is, where ever you touch the screen, until you move your finger then it acts as normal.

    Any help greatly recieved thank you !
     
  45. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Rockin good sir! So far so good. Quick and easy to follow. Bravo.
     
  46. Hedgehog-Team

    Hedgehog-Team

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

    @ tryHarder
    Unity uses the hierarchy order for UI elements, so you have juste to change the order in the hierarchy between your touchpad and your joystick.

    There is view snammping if you add it ! you must have a script that do it. Unity doesn't add by default a view snapping
     
  47. smallUser

    smallUser

    Joined:
    Sep 18, 2013
    Posts:
    10
    スクリーンショット 2016-02-18 13.04.16.png Hi,

    I am testing your RTS Camera example, Ive change the Camera rotation from 33 to 90.
    What i want to do is to restrict the camera movement
    so i can not drag anymore if the camera lookat outside the ground.(at Image blue area at top )
    I want camera able to move only inside the ground area.

    Please advice do EasyTouch has feature to do this?
     
  48. Hedgehog-Team

    Hedgehog-Team

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

    As you said yourself, this is just one example, and not a complex management of an RTS camera.

    You can just do what you want, can you modify the camera script like this :
    The movement occurs only if there is an object under the touch (remove swipe event), however, you need to add a control on the camera position to avoid the case where no object will be visible, and prevent to go back (don't forget to set layer of the ground to default)

    Code (CSharp):
    1.     private Vector3 delta;
    2.  
    3.     void OnEnable(){
    4.             EasyTouch.On_Drag += On_Drag;
    5.         EasyTouch.On_Twist += On_Twist;
    6.         EasyTouch.On_Pinch += On_Pinch;
    7.     }
    8.  
    9.    
    10.     void On_Twist (Gesture gesture){
    11.         transform.Rotate( Vector3.up * gesture.twistAngle);
    12.     }
    13.  
    14.     void OnDestroy(){
    15.  
    16.         EasyTouch.On_Drag -= On_Drag;
    17.         EasyTouch.On_Twist -= On_Twist;
    18.     }
    19.  
    20.     void On_Drag (Gesture gesture){
    21.            if (gesture.GetCurrentPickedObject() != null){
    22.             transform.Translate( Vector3.left * gesture.deltaPosition.x / Screen.width);
    23.             transform.Translate( Vector3.back * gesture.deltaPosition.y / Screen.height);
    24.         }
    25.     }
    26.  
    27.  
    28.     void On_Pinch (Gesture gesture){  
    29.         Camera.main.fieldOfView += gesture.deltaPinch * Time.deltaTime;
    30.     }
     
  49. TryHarder

    TryHarder

    Joined:
    Jan 1, 2013
    Posts:
    121
    Ahhh thank you ! I've been using Unity UI for ages but obviously never had anything over lapping until now, anyway thank you I guessed it would be simple.

    Thank you for your help.
     
  50. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Using your quick gesture pinch component, what would you recommend being the best way to clamp the values between a range? For instance, I want to shrink and expand an object, but I'd like to keep the object's scale between .5 and 2