Windows 7 Touch and Unity3d Fullscreen problem

Hello,

I have a question about handling Windows messages.

In particular I need to handle WM_TOUCH messages on Windows 7 from within Unity (see note on TUIO later).

In a Windows forms application, for instance, I would override WndProc and handle the message there.

In a Win32 (e.g. directx) application, I would implement a Message handler and use PeekMessage to get each message - farming off WM_TOUCH to a specific method to handle the decoding.

However (I believe) neither option is available to me in Unity3d since this stuff is, rightly, hidden away from developers.

So what I have done so far to try to get this working is to implement a message snooper method in an external DLL, which gets called regularly (e.g. in Update()). This peeks windows messages from the Hwnd of the Unity game window.

I can successfully trap WM_TOUCH messages in this way, and am farming them off to my decode method. Now here's the problem - the LPARAM is an invalid handle for these messages. I believe this is because the Unity message loop has already processed them with DispatchMessage. (see link text).

Therefore this approach has come to a dead end.

What I really want to be able to do is write some code in the Unity message loops to handle my WM_TOUCH messages.

Does anyone have any suggestions on how I can get this to work, or if there'll be anything in Unity 3 that will help me?

NB: I would maybe like to use TUIO, but I'm yet to find a TUIO source for Windows7 multitouch that will work in full screen mode with no user configuration. I've tried W2TUIO but am not having much luck with it.

Any information/help will be gratefully received.

Thanks, Andrew

try this: http://vimeo.com/groups/11111/videos/8570708

If you are still interested in multitouch in Windows 7, we have released a native solution, which does not requires TUIO or any other external program.
http://forum.unity3d.com/threads/152685-RELEASED-Windows-7-multitouch

For reference, I’ll answer to this rather old question:

There has been a new touch bridge for Windows7->TUIO touches out there since end of last year, Touch2Tuio. It works flawlessly, without any overlay windows, and especially if the Unity app is running in fullscreen mode).

We’re using uniTUIO and have had very good results with this bridge. All you need is a little wrapper script that automatically starts Touch2Tuio after your application launches.

Reading the various threads on the subject of multi-touch and Windows7, what are the chances of Unity3 natively supporting Windows7 multi-touch messages?

The structure is already there for the sake of smart phone applications with the Input.touches array, etc… why can’t Windows7 natively do this going forward rather than having to use a kludge like TUIO?