DEV Community

Acharad
Acharad

Posted on

RichHaptic — An Open-Source Haptics Package for Unity (iOS + Android)

I was looking for a solid open-source haptics package for Unity and couldn't really find one still being maintained. Nice Vibrations used to be the go-to for this, so I decided to build my own, inspired by it.

The result is RichHaptic: a zero-dependency Unity package that talks to Core Haptics on iOS and VibrationEffect on Android directly. No compiled native binary, no third-party runtime — the whole native surface is one .mm file plus some JNI calls you can read yourself.

GitHub logo Acharad / RichHaptic

Unity haptics for iOS and Android with live modulation. Talks to Core Haptics and VibrationEffect directly — no native binaries, no dependencies.

RichHaptic

openupm License: MIT Unity 6000.3+

A haptics package for Unity that talks to Core Haptics and VibrationEffect directly. No compiled native blob, no third-party runtime, no dependencies — not even TextMeshPro in the core assembly.

The thing it is built around is continuous feedback you can modulate while it plays: a bowstring that tightens under your finger, an engine that revs with the throttle. Most free haptics packages only fire preset taps. This one does that too, but the live path is the reason it exists.

It deliberately does not do gamepad rumble, looping, seeking, or ship a library of authored clips. If you need those, see the comparison near the bottom.

Install

Via OpenUPM:

openupm add com.acharad.richhaptic

Or Package Manager → Add package from git URL:

https://github.com/Acharad/RichHaptic.git?path=src/RichHaptic/Assets/RichHaptic

A demo scene comes with it as an optional sample, imported from the package's page in Package Manager. It needs TextMeshPro, which ships…

What it does

Everything goes through one static class, no setup needed:

using RichHaptic;

Haptics.PlayPreset(PresetType.Success);
Enter fullscreen mode Exit fullscreen mode
  • Presets — nine of them (Selection, Success, Warning, Failure, five impact levels). On iOS these call the system's own feedback generators, so they feel native and stay right as Apple retunes them.
  • Continuous feedback — start a session, push new intensity/sharpness values into it every frame, stop it when you're done. Useful for things like a drawing gesture or a charge-up. Live and gapless on iOS; on Android it's coalesced into ~150ms updates since the platform has no live-modulation handle, only "play" and "cancel."
  • Clips — a ScriptableObject you edit in the Inspector, a simple event list with intensity/sharpness per event.
  • Priority — one actuator, many callers; lower priority number wins, same convention as AudioSource.priority.

A couple of things worth knowing

  • Android doesn't let you loop a vibration reliably — I found this out the hard way on a Galaxy A54, where a repeating waveform silently truncated to just the first segment. Both platforms now just run one long segment and stop it early instead of relying on native looping.
  • iOS presets don't use hardcoded amplitude values at all — they call UIKit's feedback generators directly, since Apple tunes those per device and a fixed number can't match that.

It's pre-1.0 (0.1.0), 143 EditMode tests, verified by hand on an iPhone 15 Pro and a Galaxy A54. If you're doing anything with continuous haptic feedback in a Unity project, take a look — feedback and device reports are very welcome.

Top comments (0)