Windows 7 touch does not behave like a mouth drag, check this out (for the lucky ones with a touch screen) touch is jittery and throws navigation off screen.
Does anyone know how to handle touch in Unity ?
Windows 7 touch does not behave like a mouth drag, check this out (for the lucky ones with a touch screen) touch is jittery and throws navigation off screen.
Does anyone know how to handle touch in Unity ?
You can not add touch to the editor.
On the client side you would have to own Unity Pro and use a plugin.
I think a user just recently released his touch library
no touch works and his handles like a mouse click and drag, you’re talking about multitouch.
So to ensure: What is your exact problem?
If you just can’t use unity as with a mouse then I would assume its either a touch - tablet configuration problem or driver.
If you are asking how to handle it correctly, then its important to realize that tablet - touch have some fundamental differences to mice (unless set to behave like mice in their control tools). Mice send position differences between updates, but touch panels / tablets always send the absolute coordinate of the touch. To handle touch / tablets like mice you need to add in own code that calculates the differences so you get “mouse comparable” input data again (unless you want explicit handling of those touch data but then mouse handling requires extra code again).
You would for that reason need to have a option setting that allows the user to tell the application if he is working in touch mode and if that is set, calculate your own “move since last update” data basing on the absolute data you get from the input handlings.
Automatically detecting is not possible, because the drivers of such devices can switch the mode and windows won’t know which mode it will be in.
Generally, you can think of input from tablets / touch panels as beeing the same as a single touch driven input on the iphone
Interesting, I didn’t think that GetAxis(“Mouse X”) returns a delta of the mouse movement but it makes sense, it explains why I can still move the lookat even with the cursor at the screen edge.
It may be possible to turn this mouselook into screen drag, so when I click on a point in the screen, I actually drag it. I would not be able to look past the screen edge but I would have a uniform behavior for mouse and touch.
How would I do that ?
Just to clarify, do you just want to turn the camera left-right when you drag on the screen or do you need the position of the mouse cursor or… ?
I want to drag the screen rotation with the cursor, meaning that if I click on a stone and drag the cursor to the right, that stone will still be under the cursor when the mouse movement is done, as if I were doing a drag slide of a list on the iphone
Have you had any luck with this? I’m very interested in getting the same touch interaction you are talking about while running Unity on an HP TouchSmart computer. I don’t know how to code for the touch absolute postion conversion to mouse coordinates.
Have you gotten this working?
Thanks,
Wes
My lenovo x200t is at the shop, when it returns, I’ll get back to it…
any luck with the touchsmart ? is there a Unity plugin available ?