Author Topic: Touch detection is off for Windows Surface Pro  (Read 4831 times)

MisterAndroid

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 3
    • View Profile
Touch detection is off for Windows Surface Pro
« on: December 03, 2013, 05:50:06 PM »
We're using NGUI (version 2.6.1) as our input manager, but for some reason the touches on Windows Surface Pro are off by about a third of the screen as if the touch area was smaller than the actual screen size. We're not sure if this is a problem with NGUI or an issue with how Input.touch is coming in from the Surface Pro. The app began to detect input normally after setting the option for "Change the size of apps, text, and other items on the screen" under Display settings to "Smaller". Has anyone else had similar issues with using NGUI on the Surface Pro?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Touch detection is off for Windows Surface Pro
« Reply #1 on: December 03, 2013, 06:12:19 PM »
NGUI simply uses Input.GetTouch(#) for this, so that's what's coming from your system. That said, 2.6.1 is really old, so I would suggest you trying it with the latest version to see if it still happens there. And last but not least, you can always try your own Input.GetTouch logic just to see what values you get from the system.

MisterAndroid

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 3
    • View Profile
Re: Touch detection is off for Windows Surface Pro
« Reply #2 on: December 04, 2013, 04:40:56 PM »
Thank you so much for your reply!

It turns out that I somehow was missing the stickied post under the Unity Windows Development forums about this being a known issue. The way to solve it was adding "appCallbacks.AddCommandLineArg("-disable-independent-input-source")" to the App.xaml.cs that Unity generates. You can read more about the answer here:

http://forum.unity3d.com/threads/210632-Please-READ-Known-issues-in-Unity-4-3-when-deploying-for-Windows-8-1

Thanks again for taking the time to respond  :D