My AssetStore Link

Unity Store Link - Click to see all the Song's work that has been put on Unity AssetStore



InputTouches



"Input.Touches" is set to be low cost, easy to use helper touch (and mouse) input library for Unity gaemEngine. It helps user to get rid of the hassle to write codes for various input sequence/gesture. The library uses C# event system to signal various input event. Letting developer focus on dealing with the actual code instead of juggling with various input event.

  • Supported input event:
    - single finger: short tap, long tap, multi-tap, charge(timed-pressed), drag, swipe
    - multi-finger: short tap, long tap, multi-tap, charge(timed-pressed), drag.
    - special gesture: pinch, rotate
  • Support concurrent input (2 or more input type at the same time) for most events. The exception are multi-finger drag, pinch and rotate.
  • All gesture works with both touch and mouse input expect pinch and rotate
  • Uses event system, keep things simple.
  • Support both JS and C#.
  • Tested and works on PC and iOS device.
  • Various example scene with documented code in both JS and C#.
  • Compatible and supported by Playmaker.












* Please note that you will need some scripting knowledge to use this library.
* Please note that this framework only works on hardware that is supported by unity by default.

92 comments:

  1. Hi. This looks really great. Will there be support for Windows Phone 8 and Windows 8?

    ReplyDelete
    Replies
    1. InputTouches is all written natively in Unity. So as long as the device/platform is supported by Unity, it should be ok on the decive/platform. As far as I'm aware, Unity4.2 does support Window8.

      But having said that, I've never tested it on either a Window8 phone or Window8. So just a note that I cant guarantee that it will work flawlessly.

      Delete
  2. I purchased input touches-works PERFECT for my touchscreen project.
    However, is there a way to limit (mask) the touch area? I have a GUI that when buttons are touched my camera orbit jumps all over the place.

    ReplyDelete
    Replies
    1. Yes, there are ways. It depends on what GUI you are using as well. The default Unity scripted GUI? Or gameObject based UI like NGUI.

      For the former, you can pre-define the area contain the UI element using Rect. Then whenever a touch event is detected, use Rect.Contains(touchPosition) to make sure the touch position is not on the UI element before executing the camera code.

      If you are using something like NGUI, you can assign all the UI element with a specific layer. Then whenever a touch event is detected, use raycast from the UI camera on the layer in question to check if the touch has landed on any of the UI element.

      If you need further asistance. Please email me or leave a message on the unity forum. Those two have better text formatting option for me to type out the info you might need.

      Delete
  3. Hi,
    Can I use both shortTap and drag on one object?

    ReplyDelete
    Replies
    1. Yes you can. Just not at the same time with the same finger. ShortTap requires you to tap the screen and release the finger. Drag requires you to hold and move your finger on the screen. It's just physically impossible to perform this two at the same instance with the same finger.

      Delete
  4. We are in the process of converting/developing interactive tasks that have been originally developed for Unity Webplayer deployment. Recently we have been notified of the need to switch the hardware delivery platform from a Windows PC to Windows Tablet (Windows 8 Pro). We need to continue our deployment to the Webplayer, but would like to add responsive touch functionality. It has been rather difficult in finding concrete answers on the possibility of enabling touch/multitouch with a Windows 8 tablet using any of the available frameworks or even perhaps writing our own. Do you have any insight specifically into our needs, and more importantly will your framework support and allow responsive touch input with the current Unity Webplayer? We thank you for any assistance, and would look forward to purchasing your asset solution if it proves useful for our needs.

    ReplyDelete
    Replies
    1. while I'm pretty sure it will work on webplayer. I'm not too sure about window8 tablet is supported. THe thing I'll say is InputTouches uses all unity native touch functionality, so if the device/system is supported by Unity. InputTouches should works just fine.

      But the problem is I myself havent tested it on any window8 device yet and like you say yourself, there isnt a concrete answer that it's supported by Unity. Therefore I really cant say for sure.

      Delete
    2. I am a windows 8 and windows phone 8 developer and have been using unity for a few months now, The unity built in touch input mechanism works on both windows 8 and windows phone 8.. you of course need a library like this one from Song for a high level access, unless you want to consume the low level touch input provided by unity3d, which I have done since I needed some very specific/custom stuff. But anything from Song is high quality.

      Delete
    3. Thanks a lot DangLing for confirming that. Much appreaciated!

      Delete
  5. Good morning Song, I very much enjoy input.touches. I am having trouble translating the world space to local space when dragging and object. It works perfectly if the object is not a child of a parent object. I worked around it by un-parenting the child object, while dragging, and then re-parenting it when the dragging ends, but I am hoping to keep the child object where it is. When I did translate the position the child object I wanted to drag pops a little and then drags very slowly, so any suggestions would be great! I am not opposed to removing the parent temporarily.

    ReplyDelete
    Replies
    1. Hi Thomas, I dont quite get why moving a child object will be an issue. Have you got an implementation going already and is there any problem with that? Thing is I dont get what you are trying to do precisely. So you want to move a child object using drag and reset the position when it's done? Can you please clarify?

      Delete
    2. Yes, it does not appear to be a child object issue. I have my draggable objects under an NGUI anchor, I believe that might be part of it. I tested the child object under the tap demo and it works fine. Sorry to bother you, I'll figure it out. :)

      Delete
  6. I've tested your webplayer demo .. Multitouch doesn't work under windows 8 pc.
    I'm using a acer 10point touch display, its made for windows8.

    tested everything .. all other input managers .. this is the only one where at least the pinch functionality works. (RTS Camera example) .. also the general tap/click example taps dont register . only drag works but it labels it as mouse1. guessing its just using mouse sim.

    please let me know if you have a solution .. originally purchased easytouch .. which doesn't work under win8 pc .. period.

    thanks .. hopeful future customer :P

    ReplyDelete
  7. Hello Song, Input.Touches are working great! thanks. Here I try to rotate object itself instead of camera. I put orbitCam on the object and disable the "dist", it is rotating but the axis looks wired, it is not really following the touch direction... Which part should I change, please give me some clue, I'm new... Thanks a lot.

    ReplyDelete
    Replies
    1. Can you please send me an email instead so I can respond to you better. You can find my email in the documentation.

      Delete
  8. Hi I have bought your script and it looks very nice. I have one small question: How to disable the Twofingers drag option... I mean, I have a camera that move around and object (RTScam), everything works fine but I need to disable the Two fingers drag option, because it takes the camera away from the target object I want to focus... there is a way to do that?

    P.S. I am working on an Ipad 2 (Unity3d 3.5.7)

    Regards,

    ReplyDelete
    Replies
    1. If you are using RTSCam.cs as it's. All you need to do is to add return; in the first line after OnMFDragging(DragInfo dragInfo). That should disable the function to move the camera focal point. Hope this help.

      Delete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Are the Gesture.OnMouse* events working in the latest build? I just upgraded my Input.Gestures installation from the Unity store, but the OnMouse events don't seem to fire (on a PC, using a mouse) in my code.

    Looking, the supplied demos that use these events don't work either. For instance, the DPad demo seems to be non-functional.

    ReplyDelete
    Replies
    1. There's some error on my part that stop it from working. I'll get it fix asap. Thanks for letting me know.

      Delete
  11. Would this be a good plugin to recognise/detect custom gestures, such as circles and squares, and user defined ones, etc. Or is that outside the scope of Input.touches?

    ReplyDelete
    Replies
    1. Unfortunately you can only detect pre-determined gesture using InputTouches. And they are of the generic ones like multi-tap, swipe, pinch. It doesnt support advance gesture like square, circle, or alphabets.

      Delete
  12. Hi there, I purchased Input.Touches and i'm currently trying to modify the iorbitCam script to rotate the object instead of the camera, this is because I wan't some nice particle effects on the object.

    I have modified the script a tiny bit to invert the x rotation, but now I'm a bit stuck, the object rotates fine the first time but then the axis become miss aligned. I would really appreciate it if you could give me a few pointers.

    ReplyDelete
  13. Hi, I just have a quick question, I'm trying to use drag with an orthographic camera, but when I draw a circle where the drag started it is not showing the correct point on screen, does the orthographic camera affects the way the screen coordinates are translated to 3d? Thanks!

    ReplyDelete
    Replies
    1. No, the camera projection shouldnt affects the screen pos at all. You are still pointing at the same screen with same resolution. However the translation to 3D very much depend on the way you do the translation. If you are using the same method as the one used in example (raycast), the 3D point should be on whatever collider that the cursor point at.

      Perhaps I can help by taking a look at your code. Please email me at k.songtan@gmail.com if you wish.

      Delete
    2. Got it, let me play a bit more with the demo included and if im still stuck ill send you my code, thanks for the quick support!

      Delete
  14. Input.Touches (it obviously works on android too right?) I just couldnt find anything anywhere on that subject.

    let me know, thanks

    ReplyDelete
    Replies
    1. Yes it works on Android and iOS. This is both tested. In theory, it should work on any platform support natively by Unity.

      Delete
    2. & it says "cheap:" meaning it doesn't cost much performance for these checks?

      I'm planning on purchasing it on unity shortly.

      THanks

      Delete
    3. This comment has been removed by a blog administrator.

      Delete
    4. Not sure where I've said cheap. But yes in term of performance it's relatively light-weight. I've used it myself on a number of mobile project and it seems to be working fine. Please keep in mind I was using iPhone4 for testing.

      Delete
  15. Multitouch (2 finger) from the Demo here don't work with Win8.1(pro)
    Will it work with the standalone version for win8.1?

    ReplyDelete
    Replies
    1. Can specifically which scene of the demo you are trying on. Does other scene using the same gesture works? have you try out other 2 finger touch gesture like twist and pinch?

      If all the 2 finger gesture doesnt work, it may have to do with your device. See I've only tested it on mobile platform (both iOS and Android). And thing is Input.Touches is based on the default Unity touch input library and as I understand it doesnt work on all device, by which I'm referring to PC or desktop device with touch support. So if your device is not supported by Unity, touch component of InputTouches wouldn't work.

      Delete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Hi Song!

    I am developing a game which will target touch screen devices (Windows 8, iOS and Android).

    At the moment I am using a Unity plugin called "FingerGestures", however I am rather disappointed with it: It does not support multi gesture simultaneously!

    In fact, if for example my left thumb is already touching the screen and I want to trigger the swipe event with my right thumb I can't. I need first to raise my right thumb and then swipe with the left one.

    The question is simple: Does InputTouches allow me to swipe with my right thumb while the left thumb is touching the screen??

    If yes, you have just earned another customer!

    Cordially,
    Pier

    ReplyDelete
    Replies
    1. Hi Pier,

      I'm pleased to say that yes, in most case you can do multiple gestures on screen simulteneously. The exception, as far as I can remember are gestures like pinch and twist.

      However please keep in mind that InputTouches uses default Unity Input library for touch detection. So it will not work on device which are not supported by Unity. That may included some of the Window8 device. I cant give you a concrete answer as I only test it on iOS and Android, now Window8 device.

      Delete
  18. Hi Song,
    Just purchased your script, it works great. I have one question regarding demo scene with RTS camera, where camera will rotate around pivot point, but rotation in Z axis is locked. It works fine until I zoom out camera getting away from plane. How I can limit camera from zooming out too far?

    Best Regards,

    Sasha

    ReplyDelete
    Replies
    1. Thanks for your purchase. :)

      Unless something has gone wrong, the zoom distance is limited by default. This is hard-coded in line64 of RTSCam.cs if you are using the C# example and line57 of RTSCam.js if you are using the JS example. Is there any error message appear on the log?

      Also it might be more convenient if you just email me directly.

      Delete
  19. Thanks for fast reply ... sorted, but cant find your email :)

    ReplyDelete
    Replies
    1. My email is in the pdf documentation. :)

      Delete
  20. Hi Song!

    It's me again.
    I have purchased your plugin and I can say just one word: Amazing!

    You have just saved me and my team so much work!

    I just have one small issue that I cannot figure out: Which is the function that recognizes once a touch has left the screen.

    I am using the function void Pressed(Vector2 pos) to check when a finger is touching the joystick on the screen. I want to reset the position of the joystick to its default position once the finger has left the screen.
    How can I do that?

    Please Song, enlight me with your wisdom!

    Regards,
    Pier

    ReplyDelete
    Replies
    1. Hi Pier,

      Thanks for your purchase and I glad you like it.

      To detect if a finger have left the screen you can use event onTouchUpE.

      Hope this help.

      Delete
  21. Dear Song,

    I really have to say that I have never seen such an outstanding customer service as yours!
    Input.Touches is probably the best purchase I have done on Unity Store!

    Allow me to squeeze your knowledge and patience just one more time as I am really close to have perfectly implemented this beautiful plugin.

    Now that I can detect when a button is released, how can I detect when a "particular" button is released?
    What is happening in fact at the moment is that this function is called even when I am releasing the touch after a swipe or another tap.
    I want to trigger this function only when is the touch of the joystick that is released and therefore re-center the joystick position.

    Thanks again for your most appreciated support Song!

    Pier

    ReplyDelete
    Replies
    1. Please email you so I can respond to your question better. It's hard to me to give you any practical example via this comment box. You can find my email in the documentation.

      Delete
  22. Ok Song. Just emailed to you my question.

    Many thanks again.

    ReplyDelete
  23. In Song We Trust!!

    Thanks mate, it works perfectly!!

    I am going to leave 5 stars in Unity Store straightaway..

    ReplyDelete
  24. I have a question before purchasing this. I'm building a flick to shoot a basketball game and I've been using my own flick solution so far. The problem is that the end velocity of the ball is different depending on device I test the game on.

    For example, on my Nexus 5 I get a much higher velocity than on my Samsung S3 because the Nexus 5 has a larger screen resolution.

    So I was wondering if this package compensates for that and makes the swipe distance uniform across all types of screens?

    ReplyDelete
    Replies
    1. I feel like this is a problem that can be solved if you know by normalizing the velocity of the bally based on your screen resolution. I'm not sure if there's any restriction in your current code that stop you from doing that.

      I can tell you the same problem will happen for InputTouches if the applied force to the ball is not normalized. But since I know the raw data of the speed/magnitude given by InputTouches for any swipe input are given in term of pixel. I can easily modify the value further with the screen resolution, thus making the final value scale automatically to the screen size.

      ie, appliedVelocity=InputForce*(Screen.width*Screen.height)

      Delete
  25. Yes, I've been trying to do that because it seemed like the sensible thing to do, but I guess I had been staring at my own code for too long because I couldn't figure out a good way to do it myself. That's why I was looking at downloadable solutions because I was tired :)

    If it's not already included you don't necessarily have to add it for my sake, I'll see if I can't figure it out myself. I think I just have to look at it with a fresh pair of eyes :)

    ReplyDelete
  26. Hi, is there a way to email you a specific question vs using the comment blog about implementing InputTouches into Unity?

    I am thinking about buying your asset, but I was wondering if you could please tell me if it's able to do what I am thinking about doing in a game I am trying to develop.

    Thank you.

    ReplyDelete
    Replies
    1. Certainly. My email is k.songtan@gmail.com

      Delete
  27. Does this work in Unity4.5.1? For 2D

    ReplyDelete
    Replies
    1. I haven't tested it on the latest version of Unity, but I don't see why it shouldn't work.

      As for 2D and 3D, it makes no difference. It should works just fine in both environment. See it's just giving you set of value based on user input. It's up to you to interpret those value to a 2D or 3D context.

      Delete
  28. I bought your asset and is working great. I have one question: does inputtouches have up and down finger event.

    ReplyDelete
    Replies
    1. Thanks. I dont quite understand your question. What exactly do you mean by up and down finger event? Do you mean finger touching and leaving the screen? Or do you mean the finger moving up and down the screen?

      To detect finger touching or leaving the screen, you can use onTouchDownE and onTouchUpE. To detect finger moving up and down the screen, you can use onDraggingE and then use the direction to determine if the finger is moving in the right direction.

      Delete
  29. Hi Song,
    I am looking for a solution with regards to tapping and moving an object.
    http://forum.unity3d.com/threads/tap-click-smooth-move-to-point-with-hotspot-animations.266977/

    ReplyDelete
    Replies
    1. I dont quite understand your question or what is it that you need. Are you asking if InputTouches can do what you need? I'm afraid most of problem is about object rotation/movement as well as the animation, which is beyond the scope of InputTouches.

      Delete
  30. Hi Song,

    I'm a bit confused if I'll be able to use input.touches in my project or not. Please clarify this part of your description:
    "
    The exception are multi-finger drag, pinch and rotate.
    "

    I am making a prototype with playmaker and would like to be able to pinch to adjust camera FOV and also to move the camera around at the same time by moving the 2 touches pinching.

    Is that possible?
    Thanks,
    szomaza

    ReplyDelete
    Replies
    1. "The exception are multi-finger drag, pinch and rotate"

      The sentence means that you can't have multiple instance of multi-fingers-drag, pinch and rotate input on at the same time. ie, having 2 pairs of finger on screen and pinch.

      I should clarify that multi-finger-drag means dragging that use more than 1 finger (2 fingers dragging the same object at the same position and direction). You can have multiple finger dragging multiple object at the same time.

      I'm not quite sure what do you mean by "move the camera around at the same time by moving the 2 touches pinching". Yes you can use pinch to control the FOV, but you want the same pinch input to move the camera at the same time? If both the same action are control by the same pinch input, then yes it's doable. If you are referring to 2 pinch input at the same time. I'm afraid that is not supported.

      Delete
    2. Thanks for the quick reply and clarification, now I understand.
      By this: "move the camera around at the same time by moving the 2 touches pinching" yes I meant that you start pinching with two finger touches and use the magnitude of the pinch to alter the camera FOV while also using the positions of those 2 same touches to alter the camera position.

      Now I understand this is possible, although I am not sure yet from where I'll get those positions (I am using Playmaker), but I see you are a "dedicated developer" so I'm not worried. :-)
      Thanks and off to the asset store...
      szomaza

      Delete
    3. In that case, Thanks for your purchase then! Please let me know if you come across any issue. I may not be able to help much in term of PlayMaker but I can help you on the InputTouches side of things.

      Delete
    4. I managed to get the pinch working perfectly. With pinch magnitude I adjust the camera FOV and zoom in and out with that nicely.
      What remains is to move the camera over to the center of the pinch or make it look at that position so it is not simply zooming in and out in the same position. What I would like is to allow the user to zoom in on any area of the screen.
      I have tried a bunch of things like: use the 2 pinch positions, LERP half way between them and use that position to move the camera, but nothing really works out.
      Any idea what I should try to achieve this?
      In Dragons World (https://play.google.com/store/apps/details?id=com.sq.dragonsworld) they can pinch, move AND rotate the camera around with 2 touches. I wan't to achieve that, without the rotate part.
      Thanks in advance,
      szomaza

      Delete
    5. I managed to get the center of the pinch, the problem was that before I did not convert to touch positions from screen space to world space.
      So I now can see a dummy object nicely move to and with the center of the pinch. The next problem is when I set the camera position or have it look at this point it start jumping and rotating all around the world. Why is that? Moving the camera messes up the pinching?

      Delete
    6. I'll need to look at your code to find out how exactly you move the camera position. Perhaps you can send me a small package so I can find out more about your camera setup. Please send me a email.

      Delete
  31. hi and thanks for your plugin, (I try to use the unity forum but not sure it is still active for Input.touches), anyway, I have imported from the assetstore v1.2f1 and can't find IT_Gesture.onTouchPosDownE definition as if I had an old version ? help ;-) and thanks !

    ReplyDelete
    Replies
    1. Should have been onTouchDownPosE instead of onTouchPosDownE. There are some error in the documentation. My apologies...

      Delete
  32. I just updated and now get errors like:

    Assets/PlayMaker Input Touches/Internal/PlayMakerInputTouchesProxy.cs(49,44): error CS0123: A method or delegate `PlayMakerInputTouchesProxy.OnOn(UnityEngine.Vector2)' parameters do not match delegate `IT_Gesture.TouchHandler(UnityEngine.Touch)' parameters
    --------------
    Assets/PlayMaker Input Touches/Internal/PlayMakerInputTouchesProxy.cs(49,44): error CS0428: Cannot convert method group `OnOn' to non-delegate type `IT_Gesture.TouchHandler'. Consider using parentheses to invoke the method

    Please help,

    ReplyDelete
    Replies
    1. Thanks Song for the quick support in e-mail!

      Solution: download update package from: https://hutonggames.fogbugz.com/default.asp?W961

      Delete
  33. Hi,
    I am looking for interactivity with Windows touchscreen monitor(Drag, Rotate, Zoom). I have checked your online demo - https://dl.dropboxusercontent.com/u/23073684/_UAS_Asset/InputTouches/Demo/WebPlayer.html. with Dell touchscreen monitor but i was not able to zoom the object.
    I am working with windows 7. Could you help me out with this if i wanna go ahead with the Input.touches.

    Thanks

    ReplyDelete
    Replies
    1. Well, InputTouches doesn't add any 3rd party input detection system. It simply utilize the default touch input detection of Unity and use that to interpret a varieties of input sequence. In other word, it won't detect any input that is not supported by Unity.

      I'm guessing in your case, zooming doesn't work because unity doesn't recognize multiple touches. I suppose you can try a simple code like this:

      void Update () {
      if(Input.touchCount>0) Debug.Log("current touch count: "+Input.touchCount);
      }

      If the debug message doesn't show the correct touch count (how many finger are touching the screen), then I dont think InputTouches will work correctly with your touch screen monitor.

      Delete
  34. Hi,
    I have checked the demo(https://dl.dropboxusercontent.com/u/23073684/_UAS_Asset/InputTouches/Demo/WebPlayer.html ) which is online with my windows touchscreen monitor, where zoom didn't work. So my query was - if i go for input.touches with unity will it work for Zoom, Drag, rotate with windows touchscreen monitor.
    One point i read in the above discussion is it only works with Windows 8.
    Thanks

    ReplyDelete
    Replies
    1. I cant tell you for sure. I haven't tested it myself since I don't run windows8 and don't have any hardware to test with. From what I can gather, it works on window phone but not on touchscreen monitor.

      My educated guess would be any input that require more than 2 fingers will not work.

      Delete
    2. Hi Song ... i tested the link - (https://dl.dropboxusercontent.com/u/23073684/_UAS_Asset/InputTouches/Demo/WebPlayer.html) with Dell touchscreen monitors and the link worked. I tested the link with IE, Chrome and Rotation and Zoom worked but with Mozilla on the rotation worked.
      Is there any restriction towards browsers and could we get a export for EXE. Please guide.

      Thanks

      Delete
    3. As far as I'm aware there's no official restriction or support for any browser in particular, for touch screen monitor anyway. But honestly I haven't really been paying much attention to this sort of information. I suppose it's down to the hardware-browser combination to some extend.

      I could send you an exe. please email me at k.songtan@gmail.com

      Delete
  35. 안녕하세요~한국분이 배포하시나보네요~반갑네요...다름이 아니라 이걸로
    기어VR측면 터치패드도 구현이 가능한가요?제가 언어쪽으로는 완전 무뇌한이라...가능하다면 어떻게 구현해야하는지 설명부탁드려도 될런지요?

    ReplyDelete
    Replies
    1. I dont speak korean so this is from google translate. I hope you can understand.

      I have no experience with VR so I can't tell for sure. Thing is InputTouches uses only Unity default touch input library with no external plugin. That means if the device is supported by Unity by default, then InputTouches should works on it too. I hope this answer your question.


      나는 한국어 이야기 해달라고 그래서 구글 번역 에서 이다. 나는 당신이 이해할 수 있기를 바랍니다.

      나는 내가 확실히 말할 수 없다 VR 과 경험이 없다. 것은 InputTouches 없이 외부 플러그인 만 유니티 기본 터치 입력 라이브러리를 사용 합니다. 장치가 기본적으로 유니티 에서 지원하는 경우 그 다음 InputTouches 해야 거기에 작품 이 너무 의미한다. 나는이 질문에 대한 답변 바랍니다.

      Delete
  36. I'm afraid my expressions may be rude or hard to read, because I'm not so good at English. But please, please be patient!

    When I'm using the MultiTapE, I want to know how many fingers I have tap.
    Even with two fingers, "tap.fingercount" is 1 .
    In that case , "Input.touchCount" is 2 .
    Is there a way to determine the number of fingers when using the MultiTapE?

    ReplyDelete
    Replies
    1. Thanks for bring it to my attention. You are right, the value of tap.fingerCount should have been 2 when tapping with 2 fingers. I've checked and indeed there has been a bug. Please send me an email so I can send you a fix when I've done it. Otherwise you will have to wait until I update it on AssetStore.

      p/s: your english is just fine. :)

      Delete
  37. Thanks for your fast and considerate reply. :)
    I sent an email titled ”tap.fingerCount”.

    ReplyDelete
  38. Hello...Song
    I have a question before purchasing it... Is Input.touch able to support on Augmented reality target objects??? Actually...i have to develop a interactive Unity app.with the help of Vuforia.Need to rotate only z-axis & scale the augmented object...please help!!!

    ReplyDelete
    Replies
    1. I can't say for sure. I'm not familiar with augemented reality and it's implementation when it comes to Unity. As far as I know, rotating and scaling of object shouldn't have anything to do with input, and InputTouches is just a library for input detection. So I'm not sure if that would help.

      Delete
  39. Hello,

    I have a windows laptop that has a touch screen. The problem with building a Unity app for PC is that it recognizes a finger touch as mouse. So it is difficult to make a pinch zoom function on a laptop touch screen. Would your product help enabling a pinch zoom function on a touch screen laptop? Appreciate all the quick responses!!

    ReplyDelete
    Replies
    1. Implementing a pinch zoom function is actually quite easy using InputTouches. The problem is I'm not sure if the touch input will be recognized. As far as I know, Unity's touch detection doesn't work on all touch screen laptop.

      You can do a quick check with this code Debug.Log(Input.touchCount); and try touching the screen with two or more fingers. If the log shows the correct number of fingers touching the screen, then yes you can use InputTouches.

      Make sense?

      Delete
    2. Yes, thank you for the quick reply! Will check.

      Delete
  40. Hello, This is a nice plugin for unity but is there any way to get the OnGui stuff to work on WebGl for mobile?

    ReplyDelete
    Replies
    1. I don't think that is relevant. This plugin has nothing to do with OnGUI().

      Delete
  41. Hi there, I've been going through the code to find where I should put a check for a raycast (to check if Swipe event started on UI layer).

    Right now pressing a button starts Swipe event and it causes some movement problems :)

    Hope this blog is still relevant and you can assist me with this problem!

    ReplyDelete
    Replies
    1. The code is already there, you simply need to call the function to check. Like so:

      if(IT_Utility.IsCursorOnUI(cursorPosition)){
      //cursor is on UI
      }
      else{
      //cursor is not on UI
      }

      Hope this help.

      Delete
    2. Sweet! I haven't noticed IT scripts at all!

      Thanks for the help! Off to the asset store to write a review!

      Delete