x


Detect strength of touch - Unity Touch API

Is it possible to detect the strength of a touch?

more ▼

asked Jul 07 '11 at 09:24 AM

ina gravatar image

ina
3.3k 492 548 597

(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

not for the vast majority of phones out there as they don't have touch sensitivity input just touch screen position x and y parameters as excessive pressure would bust the screen. Not sure about Ipad you will have to look it up (probably not).

more ▼

answered Jul 07 '11 at 01:26 PM

AngryOldMan gravatar image

AngryOldMan
2.5k 12 21 47

iPad 2 and iPhone 4 have gyroscopes that let you get touch strength..

Jul 11 '11 at 09:32 AM ina

No they don't. Gyroscopes are for detecting degrees of rotation and coupled with accelerometers they can detect a number of things but in no way can a gyroscope detect pressure on any imac device. Ipads are the "height" of apple current apple technology and even they cannot detect pressure. They use biometric mulit-touch sensors and they do not pick up pressure of touch. In fact a company has been working on using a stylus with pressure sensitivity specifically for an ipad but otherwise as standard no touch pressure.

Jul 11 '11 at 11:54 AM AngryOldMan

The solution below for using accelerometer + gyro might be a way to get touch strength via gesture impulse - it's an infinitesimal spike with a tiny twist

Sep 16 '11 at 08:37 AM ina
(comments are locked)
10|3000 characters needed characters left

Accelerometer is used to detect the strength of impact of touch in Apple's own GarageBand App which you can get for iPad. It works for both iPad 1 and 2. There are piano keys which you can touch or mash a bit stronger, and the sound actually changes based on the strength of impact. This is a neat trick but might not be exactly what you are looking for.

more ▼

answered Jul 18 '11 at 12:31 AM

pcote gravatar image

pcote
16 4 5 6

(comments are locked)
10|3000 characters needed characters left

I'm not entirely sure how it would do that. All modern touch devices have capacitive screens (as opposed to resistive), which work by detecting where on a grid of criss-crossing wires an electrostatic field seems to be distorted because a conductor (the finger) touches the screen. The only information you have in addition to location is how much the capacitance at that particular node in the grid differs from its surroundings. Because a capacitive touch screen isn't flexible, pressing harder doesn't necessarily conduct power between your finger and the nodes better. It might cause your finger to make contact with more adjacent nodes because the fingertip "splats" out with the pressure, but if you tell the device to interpret a higher capacitance difference as the equivalence of more pressure, what happens if I touch the screen with something that's a better conductor than a finger? You could cheat the system that way. :P

more ▼

answered Jul 11 '11 at 12:43 PM

CHPedersen gravatar image

CHPedersen
5.9k 13 22 61

If you install MultiTouch Visualizer 2 app on your Android device (I tested this with HTC Desire and Asus Transformer) you can track/visualize each finger/touch. The radius of the circle represents the amount of pressure. This proves that at least these 2 devices(hardware) and Android SDK/API(software) has support for it. The only question is does Unity API has direct support for it or do we need to make a Unity/Android SDK plugin.
Update:
Maybe pressure is just the radius of the contactpoint. When you press harder the radius of the contactpoint is also increasing but this doesn't necessarly also mean more pressure for example when you have big fingers. I have to test this with a special tabletstylus with a constant radius and using different forces.

Sep 09 '11 at 08:32 AM Jan Oonk
(comments are locked)
10|3000 characters needed characters left

It might not be the amount of pressure. Think on a 2d level. When you press on the screen, the harder you press the more you finger touches the screen, because it squishes on to the screen. Garageband may just be measuring how fast the radius of the touch increases, which tells it how fast you pushed down, thus simulating a sense of pressure.

more ▼

answered Jul 05 '12 at 03:49 AM

nixtwiz gravatar image

nixtwiz
243 3 4 5

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x577
x409
x8

asked: Jul 07 '11 at 09:24 AM

Seen: 2442 times

Last Updated: Jul 05 '12 at 03:49 AM