0
\$\begingroup\$

I'm used the Handheld.Vibrate() method. I know that if you call it several times, you can increase the vibration time, but when it is called once, the vibration lasts about 1 second. But I would like to make an imitation of clicking on the android keyboard. (Vibration ~ 0.2s)

How to set the duration of the vibration?

\$\endgroup\$
  • \$\begingroup\$ What platform are you targeting? (I do not think there is a platform agnostic solution) \$\endgroup\$ – Theraot Nov 30 at 3:22
  • \$\begingroup\$ After looking around the Unity community, apparently the recommendation is to get a plug-in from the Asset Store. You can find them under "Tools" -> "Integration", search for "Vibration" or "Haptic Feedback". \$\endgroup\$ – Theraot Nov 30 at 4:00
  • \$\begingroup\$ basically ios has many different types of vibration but android has only basic vibration. in unity only HandHeld.Vibrate() works in both of them. that vibrates phone in 0.5 seconds. if you you want to vibrate in a wanted length, just make a coroutine thatvibrates phone in wanted seconds \$\endgroup\$ – virtouso Nov 30 at 6:57
  • \$\begingroup\$ @Theraot that looks like an upvote-worthy answer, especially if you can include a summary of one of these plug-ins or citation of this recommendation. \$\endgroup\$ – DMGregory Nov 30 at 13:39
  • \$\begingroup\$ @virtouso as we can read in OP's question, they want a shorter vibration than the default, not a longer one. \$\endgroup\$ – DMGregory Nov 30 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.