Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ina · Jul 07, 2011 at 09:24 AM · mobiletouch

Detect strength of touch - Unity Touch API

Is it possible to detect the strength of a touch?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by AngryOldMan · Jul 07, 2011 at 01:26 PM

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).

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Jul 11, 2011 at 09:32 AM 0
Share

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

avatar image AngryOldMan · Jul 11, 2011 at 11:54 AM 2
Share

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.

avatar image ina · Sep 16, 2011 at 08:37 AM 0
Share

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

avatar image
1

Answer by CHPedersen · Jul 11, 2011 at 12:43 PM

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jan Oonk · Sep 09, 2011 at 08:32 AM 1
Share

If you install $$anonymous$$ultiTouch 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 SD$$anonymous$$/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 SD$$anonymous$$ plugin.
Update:
$$anonymous$$aybe 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.

avatar image
0

Answer by pcote · Jul 18, 2011 at 12:31 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by nixtwiz · Jul 05, 2012 at 03:49 AM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hacky97 · Dec 02, 2014 at 02:27 PM 0
Share

$$anonymous$$aybe a bit late, but I came here looking for exactly pcote's answer. Garageband uses the accelerometer indeed. Not the radius of the touch.

avatar image
0

Answer by christophergoy · Dec 05, 2015 at 04:35 PM

Unity began supporting Touch pressure in Patch 5.2.2p1. Look for Touch.pressure and Touch.maximumPossiblePressure.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Samsung Swipe and Touch 1 Answer

Issue with Input.GetMouseButton (0) on mobile (iPhone) 2 Answers

How to differentiate touches on mobile devices 1 Answer

Pressing two buttons simultaneously with the same touch 2 Answers

Deactivate Swipe Controls on Pause? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges