- Home /
How to disable Touch to Mouse Click translation
Hi All,
Unity by default translates touches to left mouse clicks. I don't want this behavior.
I'm developing an app that supports multitouch, I want to deploy it to Windows tablet and I want the app to support some mouse control as well.
The taps are triggering mouse events now which is wrong.
Is there a setting in unity input that disables it? Or can I disable it through code?
I have a similar problem. Did you find any solution?
Hi Joao, unfortunately I don't know about any simple setting that I can just uncheck in unity sttings. I had to do a workaround in my code. Now in my project mouse clicks prevents touches from being recognised and vice versa.
I think Unity $$anonymous$$m should really revise this "feature" because for me it was more trouble than help so far.
Answer by xandermacleod · Feb 09, 2014 at 12:24 PM
i tend to setup a specific scenario in my scripts for this. i.e. something like
if(Input.GetMouseButtonDown(0))
{
if(Input.touchCount > 0)
{ return; } else {
//.... rest of it here
}
}
Your answer
Follow this Question
Related Questions
Input.getTouch() vs checking if button is clicked 1 Answer
How add click area? 1 Answer
index out of bounds 6 Answers
IOS object touch, collider 1 Answer
Pinching invokes SingleTouch 1 Answer