[RELEASED] Windows 7 multitouch

We are proud to announce the release of our Windows 7 multitouch solution for Unity3D, now available in Asset Store (W7Multitouch (with NGUI integration) | Input Management | Unity Asset Store).

Finally you can use singletouch and multitouch screens directly in Unity3D. No more need to use TUIO or other external programs.

Feature list:

  • Works with Windows 7.
  • Windows 8 coming soon.
  • Support one finger and multifinger touches.
  • Includes NGUI support for basic events.
  • Gestures to NGUI objects.

See the included readme.txt for more information, or reply to this post with a question.

Hope you enjoy this new multitouch capability.

UPDATE 1.06:

  • Windows 8 supported
  • Lots of fixes and improvements.

Looks nice, any video examples?

Cool! Might get it soon. Can we see a video in action?

Hi, just bought your windows7 touch asset from the store and there seems to be a problem with some of the code.
I’m getting the following errors:

Assets/W7Touch/NGUI/UICameraW7Touch.cs(41,46): error CS0122: `UICamera.GetTouch(int)’ is inaccessible due to its protection level

Assets/W7Touch/NGUI/UICameraW7Touch.cs(54,54): error CS0122: `UICamera.Raycast(UnityEngine.Vector3, ref UnityEngine.RaycastHit)’ is inaccessible due to its protection level

Assets/W7Touch/NGUI/UICameraW7Touch.cs(62,37): error CS0122: `UICamera.RemoveTouch(int)’ is inaccessible due to its protection level

Assets/W7Touch/NGUI/UICameraW7Touch.cs(102,30): error CS0122: `UICamera.ProcessTouch(bool, bool)’ is inaccessible due to its protection level

You must apply the patch included in the W7Touch/NGUI folder. There are instructions in the included readme.txt.

The readme file doesn’t mention the ngui.patch.

Hi,

first of all, thank you for developing this! I just bought it, how do I apply the NGUI.patch, I get same errors like Bjerre… I’m using unity3.5.5f2 pro on mac and ngui.

Maybe you could give me a little example how do I process touches from GetTouch, it would be very nice

Thank you in advance.

Sorry, I forgot to include some patching instructions. I’m updating the readme.txt with some instructions, and I put them here too. I’m also making a video tutorial to use it with NGUI.

Patching is a very standard process, you can find several tools on the internet, o apply it manually.

If you use some kind of version control, like TortoiseSVN, right clicking on the .patch file has a submenu to apply it. If it asks, use the suggested path.

If you prefer to do it manually, the .patch file is just plain text, with lines to be removed marked with a minus sign, and lines to be added marked with a plus. Line numbers and the other lines are for context, so you can know where to replace.

Or you can make the modifications yourself, by making the following methods public (add “public” to the beginning of the line): Raycast, GetTouch, RemoveTouch and ProcessTouch
and adding this line

SendMessage("ProcessInput", null, SendMessageOptions.DontRequireReceiver);

in the middle of the Update method, just before

if (useMouse  mHover != null)

Maybe some day the NGUI author accept this patch and makes it available in the next update, making this process unnecesary.

You can find an example of use in the UICameraW7Touch.cs file, in the ProcessInput method, which is used for the NGUI integration. Maybe is a little complex and has too many NGUI related code, but I hope it helps.

thank you so much for the patch explanation and the video! I think now I can get started.

Hi,

Is you extension working without NGUI, with some functions just like the standard Input API ?

Regards,

There is an API to get the touches, so you can use it without NGUI. The W7TouchManager class has the API to access the touches, and you can use UICameraW7Touch as an example of how to process the touches.

Hi,

That’s great that someone is adding needed functionality for us multi-touch developers.
But actual touch/gestures recognition is much more than just getting WM_TOUCH events. And it’s wrong to say that TUIO is worse than win7 touch. There are cases when TUIO is a much better solution.

I am a multi-touch feveloper myself. And here’s (mostly) my open-source library which is much more than just touch recognition.

I believe that adding WM_TOUCH events is just a matter of time for Unity team because of Windows 8. If right now only a dozen of people need this functionality, with Windows 8 it will be a common request.

Our package does more than getting WM_TOUCH events, thats where the NGUI integration comes into play. Single finger (press, release, click, double click) is handled to the NGUI event system and some two finger gestures are implemented also (scroll, rotate, and drag).
We intentionally left the possibilty to read raw touches to integrate with other touch gestures libraries or custom solutions.

By the way, our solution does work inside the editor and is stable. Replacing the WndProc is not the best solution, but if you want to know how we do it, you’ll have to buy the package. :wink:

I understand that. We just didn’t need it at that time.
If you want an integration with something like NGUI you can fork the lib and write it yourself. We don’t use NGUI so we don’t need it.

OK this really is not good

1: I go to run and I get this stupid NGUI thing, I do not have or want NGUI I am using Scaleform, I only want to deal with the touches responsively.
2: It will not run: I get this error… Host has not Windows 7, it has: ‘Microsoft Windows NT 6.1.7601.0’ also, check if the screen is touch capable
3: I do not have the touch screen as my developer envirionment, The touch screen is somewhere else, another floor in the building. I am going to then send it to a client. I am on a Windows 7 machine, but not with a touch screen.

I really feel like you ripped me off of $50

Hi Valyard,

I tried out your library (sample project included) - look’s very nice and all gestures running very smooth, the touch recognition is very fast - great work!

My problem is, I’m not very advanced in programming and I’m programming in javascript/unity script not in c#. Can I use your library with unity script, if so can you please post a sample code? I would like to use the scale gesture, but I need to define min and max scale factor for scalable objects.

Thank you in advance.

valyard

We should send you the $50 thanks man, your library saved asses this weekend. If anything good came from purchasing Win7 Multitouch its that I found your stuff.

First of all I didn’t want to hijack the thread.
There will be a post soon about the library and a package in the Asset Store.

I need to test it. The library is for advanced users right now but we have plans to add easy to configure components.

I’m glad you liked our effort. If you want you can promote the library to help it grow.