Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Multi-Touch not working in Windows 7

Discussion in 'Windows' started by electrohamster, Aug 21, 2014.

  1. electrohamster

    electrohamster

    Joined:
    Aug 28, 2013
    Posts:
    10
    I'm having a lot of difficulty getting multi touch to work for windows 7. I have a unity pro license. I've tried on two different laptops (apple and pc). The screen I am using is a SMART Board 8055i. Multi touch worked several months ago but not now, which might imply something broke/changed in a recent version of Unity.

    I'm using the TouchScript asset to handle touch input. No mater what I try I can only get single touch to work (touch is possibly being converted to mouse input???)
    I've set simulateMouseWithTouches=false and multiTouchEnabled=true

    I know that multi touch is working for the OS in general because when I open mspaint and swipe 5 fingers across the screen i get 5 different lines drawing simultaneously.

    Does anyone have any advice for how to solve the issue?

    Thanks!
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,658
    Unity doesn't support touches for desktop applications. Touches are only supported by Windows Store Apps applications
     
  3. electrohamster

    electrohamster

    Joined:
    Aug 28, 2013
    Posts:
    10
    I'm confused. Are you telling me that TouchScript will not work with Windows 7 desktop?

    http://u3d.as/content/valentin-simonov/touch-script/4g6
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,627
    Unity editor itself did not work with touches. I think touches will be supported in Windows Standalone in 5.0.
    As for TouchScript, it's creator probably could provide more information.
     
  5. electrohamster

    electrohamster

    Joined:
    Aug 28, 2013
    Posts:
    10
    I found the issue with the help of Valentin Simonov (the author of TouchScript).

    So TouchScript DOES provide touch and multi-touch support for Windows 7 desktop. However, it does NOT work in the Unity Editor. I don't know the exact reason but I'm assuming the editor receives all the windows touch events and doesn't forward them to the Unity game engine. Anyways, you cannot test multi-touch in the editor, you have to make a final build and test in the final exe build.

    Furthermore, you have to drop a Win7TouchInput Script object (TouchScript provided) into the scene to make everything work correct. When you do this however, it breaks single touch in the editor (single touch is emulated with mouse clicks). Thus, I never tried a final build with Win7TouchInput because I assumed it was breaking eveything even worse.

    Hope this helps someone. Remember, never leave open unresolved threads!
    http://xkcd.com/979/
     
  6. Athomield3D

    Athomield3D

    Joined:
    Aug 29, 2012
    Posts:
    193
    You may get a single touch behavior, however, that's the mouse press and unity is trying to work around it.
    There is no way you can have multiple mouse inputs at once, That's why this isn't working.
     
  7. electrohamster

    electrohamster

    Joined:
    Aug 28, 2013
    Posts:
    10
    Additional instructions -
    So.... and I almost went crazy figuring this out. The editor does something to the windows touch events that needs to be reset/released/undone/who the heck knows. Sometimes when you build and run the exe in the editor touch doesn't work afterwards. The work around is, and I'm not making this up

    1) build exe in unity
    2) open mspaint and perform some quick multi finger touch drawing
    3) run your final build through windows explorer - DO NOT use the build & run option in Unity

    mspaint appears to undo whatever voodoo the editor does to the windows touch event system......
     
  8. teexit

    teexit

    Joined:
    Jul 5, 2012
    Posts:
    26
    In our game, we use TouchScript, too.

    It work correct.

    If you want to check whether touch function work correct, you need to build game to exe.

    TouchScript use some native code, it needs to build exe to test.