How to chnage the duration of Handheld.Vibrate?

Updated on July 28, 2019 in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
0 on July 28, 2019

I have setup the Handheld.Vibrate function to vibrate the device every time the player jumps and hits the ground. But the default duration that it has is too long. Is there a way to make the duration shorter?

Here is how I have set it up.

   if (collision.gameObject.tag.Equals(“Enemy”))
{
Handheld.Vibrate();
rb.AddForce(Vector3.up * jumpForce);
Debug.Log(“Hit”);
}

 

Thanks.

  • Liked by
Reply