x


getPressure for touch pressure on Android or iOS

Unity3d supports Touch, but is there a way to fetch the pressure of a touch on mobile devices?

more ▼

asked Jul 18 '11 at 07:05 AM

ina gravatar image

ina
3.3k 492 551 602

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

3 answers: sort newest

Wrong, Garageband detects the pressure by accelerometer. Because when you tap hard on device it produces light motion. Try to wiggle with your device during play and you receive higher "pressure". This technique works quite well. used on aquarium when user taps on the glass the sound gets louder.

more ▼

answered Nov 26 '12 at 07:36 AM

Silicon Jelly gravatar image

Silicon Jelly
1 1 1 2

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

It might not be the amount of pressure that apps like Garageband use (like how hard you hit a key changes the sound). 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, for example, 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. Now, whether or not you can get the size of the touch in unity I do not know.

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

iPhone/iPad has no such thing, in Unity or otherwise. I'm not certain, but I suspect Android doesn't, either.

more ▼

answered Jul 27 '11 at 06:00 PM

almo gravatar image

almo
1.7k 2 6 18

(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:

x2489
x1967
x583
x414
x4

asked: Jul 18 '11 at 07:05 AM

Seen: 1892 times

Last Updated: Nov 26 '12 at 07:36 AM