Search Unity

Question Transparent Window app with Multitouch not working

Discussion in 'Scripting' started by mercuriousreign, Apr 14, 2021.

  1. mercuriousreign

    mercuriousreign

    Joined:
    Nov 30, 2017
    Posts:
    5
    Hello! sorry if this is the wrong place to post this,
    So I have been trying to create an app that overlays the desktop. It has a gizmo that you can move,rotate and scale by multi touch (using Leantouch asset for this)

    Mostly just fiddled with Pheonise's transparent window that he uploaded in github. (i dont really know much past if statements soo...).

    https://github.com/pheonise/Unity3D-Desktop-Overlay
    https://github.com/pheonise/Unity3D-Desktop-Overlay/blob/master/Assets/Scripts/TransparentWindow.cs

    It works fine and all save for one thing, It can not detect multi touch at all(which is what I need it to do mostly)

    ... Mouse clicks works fine, The actual detection code seems to comes from SystemInput where it checks if the mouse buttons are down or up....I think.....

    https://github.com/pheonise/Unity3D-Desktop-Overlay/blob/master/Assets/Scripts/SystemInput.cs

    So I am guessing I have to write up where the apps detects multi-touch input from the user. How do I go on about doing this? I tried detecting by using Leantouch's free version (where it can detect number of fingers) but that doesn't seem to work.
    It looks like I might have to write a code using .dll either the Wacoms's (WacomMTDN.dll) or Window's own (WM_Pointer)

    First I tried to use Zelo's unity utility to detect number of fingers in current frame...but I dont think I am doing it right.

    https://gist.github.com/zalo/a88b6c188cbe504784374de656afe3c4

    In anycase I guess I need a general feedback on this, again I am not that expert to actually understand the Wacom 's api or other dll...but if you could point me to a totally noob tutorial on this or just what to do in this case that would be great.

    Thanks.