I'm wondering if the Screen.height * 0.1f isnecessary, because that means that on a ipad3 or iphone5 I can't have click thresholds lower than 24 and 11 px respectively. It especially causes trouble when I'm doing the UIRoot with manual height, because on ipad 3 (or other ipads) the height is calculated as 512, which means 24 px is quite big, since it's only 384 px wide. :)
I would just change it in UICamera, but then it will break every time I update NGUI - so I was hoping you could either remove it or make a "smarter" solution.
Nicki.
Title: Re: Touch threshold has a minimum based on screen.height
Post by: Nicki on October 10, 2012, 08:06:40 AM
I've made a different solution based on DPI (since we only support iOS devices right now), so I can define a certain distance that your finger has to move instead of by pixels, then by inch/cm and calculate the pixel thresholds from that.
Title: Re: Touch threshold has a minimum based on screen.height
Post by: ArenMook on October 10, 2012, 09:41:24 AM
Share the solution and I will be able to integrate it into the main branch.
Title: Re: Touch threshold has a minimum based on screen.height
Post by: Nicki on October 10, 2012, 05:33:46 PM
Will do when I get back to work tomorrow.
Title: Re: Touch threshold has a minimum based on screen.height
Post by: damelin on March 05, 2013, 12:42:56 AM
I saw this post after a fight with 'touchClickThreshold'. Would it be possible to reconsider the ScreenHeight * .1f? This make a big threshold, bigger then the default 40 one, which is already high for most devices.
I saw the suggestion of cancelling click on OnDrag (with clickNotification = none) but, I would rather use the touchClickThreshold, since it could perfectly do the work!
Thanks
Title: Re: Touch threshold has a minimum based on screen.height
Post by: ArenMook on March 05, 2013, 02:33:06 PM
Just tweak the code to what you want it to be. I can remove the 0.1 part in the next update.
Title: Re: Touch threshold has a minimum based on screen.height
Post by: damelin on March 05, 2013, 05:55:30 PM
Yeah, it would be great if you could remove it! :)