Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

taptic engine?

Discussion in 'iOS and tvOS' started by Aaron-Meyers, Oct 3, 2016.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    201
    When can we expect support for the taptic engine in Unity iOS?
     
    Gametyme likes this.
  2. deekpyro

    deekpyro

    Joined:
    Oct 16, 2012
    Posts:
    57
    Is this exposed in iOS 10?
     
  3. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    The Taptic Engine API is exposed in iOS 10 for iPhone 7/7+. Look into the UIFeedbackGenerator class if you want to hook into this API via a Unity iOS plugin.
     
  4. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    201
    I guess I was wondering when we'd see an official Unity API for it now that it is exposed in iOS 10.

    If someone released a plugin, would something platform-specific like that work in testing via Unity Remote?
     
    Gametyme likes this.
  5. deekpyro

    deekpyro

    Joined:
    Oct 16, 2012
    Posts:
    57
    I would also like to have Unity support the Taptic Engine. To any plugin makers I'd be willing to pay for a plugin while we wait for Unity to include support.
     
  6. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    Not likely - it would probably require deploying to an actual device, which is the case for most Unity projects containing iOS plugin functionality.
     
  7. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    201
    That's what I figured. Though I just took a peak at the API documentation you linked above and its pretty disappointing. Was hoping for something more akin to the Vive's haptic feedback API where you can modulate intensity and frequency for different effects.

    This seems like there are just 3 different canned styles they offer (impactOccurred, selectionChanged and notificationOccurred). I get that opening it up to long vibrations could be a big drain on battery, but what they gave us is kinda boring :(
     
  8. ekaralar

    ekaralar

    Joined:
    Jan 13, 2015
    Posts:
    10
    Does anyone still need this?
     
  9. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    There are actually 7 different types of haptic feedback that can currently be triggered with the Taptic Engine:
    - Impacts have 3 intensities (light, medium, heavy)
    - Notifications have 3 unique types (success, warning, error)
    - Selection Occurred is a single type

    While I agree that it would've been nice to be able to dial in an intensity for impact feedback with some numerical value, one can still get a good amount of expressiveness from the three impact types that Apple has exposed. The notification feedback types are interesting and well designed IMO - they are really sequences of vibrations that actually do a pretty good job at communicating the associated notification state. For example, the "success" notification is really a sequence of two vibrations that seem to ascend in intensity and are timed in such a way that it feels kind of like the phone is giving a rubber stamp of approval (funny way of describing it I know, but that's what it feels like to me), whereas the error notification is a very rapid back-and-forth vibration that (again, to me) feels like a head shaking back and forth to say "no". It's really quite an interesting sensation that can't be accurately described in text, you really have to feel it ;)

    The selection occurred is a single low intensity vibration that makes sense when you consider Apple's intended use for it, which is providing simple feedback to communicate that a user selection has changed (like on a UI slider, or in iOS' date picker UI).
     
  10. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    Just wanted to check in on this thread again to announce that I've published an asset which allows you to use the entire Taptic Engine haptic feedback API in your Unity iOS games! It's called iOS Haptic and is $5 on the Asset Store: https://www.assetstore.unity3d.com/en/#!/content/76017

    Note: Currently the Taptic Engine API is only supported for iPhone 7 and iPhone 7 Plus.
     
    Gametyme likes this.
  11. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    558
    Is this compatible with 5.5?
     
  12. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    I haven't installed 5.5 yet but I expect it would run fine. I just had a look at the release notes and nothing jumped out at me, and there haven't been any changes to the iOS API since it was submitted either. I will install a copy this week to confirm.
     
    Gametyme likes this.
  13. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    558
    As soon as you confirm I'm in.
     
  14. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    130
    Can confirm, does work on 5.5.
     
    Last edited: Dec 11, 2016
    Gametyme likes this.
  15. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    558
    3d touch would be nice in this package.
     
  16. smetzzz

    smetzzz

    Joined:
    Mar 24, 2014
    Posts:
    137
    Definitely +1 on Unity3d supported Haptic feedback. Specifically for iOS.
     
  17. CHatchSchell

    CHatchSchell

    Joined:
    Mar 30, 2017
    Posts:
    1
    smetzzz, aihodge and Gametyme like this.
  18. tannerhearne

    tannerhearne

    Joined:
    Feb 13, 2015
    Posts:
    9
    Thanks @aihodge for your Taptic Engine package. Just installed it and it works great! (Side note: I am on 2017.1 — so it is still compatible.)
     
    aihodge likes this.