Developers / Unity / Meta Quest walkthrough
Meta Quest tutorial project
Get the Meta Quest tutorial project and see how each of its three scenes adds haptics.
Get the project
The project is on GitHub: HexR-Developer-Tutorial-Meta-OVR ↗. Clone it, or use Code → Download ZIP on that page.
shell
git clone https://github.com/MicrotubeTechnologies/HexR-Developer-Tutorial-Meta-OVR.git- Open it in Unity 6000.0.66f2 or newer. The first time, Unity downloads the HEXR package from GitHub, which takes a few minutes and needs git on your
PATH. - Add the free Meta XR All-in-One SDK as described in Project setup.
- The project uses HEXR
#v0.9.3— one release behind this package; change the pin to#v0.9.4to get its fixes. The pin is the last part of thecom.microtube.hexrline inPackages/manifest.json. - The scenes are in
Assets/Scenes/. Build And Run to your Quest (how to put it on the headset), then connect the gloves from the HexR menu; its scene buttons switch between the three. The first time, allow the Bluetooth permission, Nearby devices — why it matters.
The tutorial scenes
Each scene shows a different way to add haptics. Meta’s Interaction SDK detects the grab, pinch or poke; HEXR decides what the glove does. Select any object in Unity to see its components.
1. Basic Tutorial
Four objects on a desk, each triggered a different way.
| Object | How the haptics are added | What you feel |
|---|---|---|
| Foam ball the glowing ball — pick it up | HexRInteractableHaptics beside Meta’s Grabbable, Fire On set to Select And Hover. No events to wire | Pressure on the thumb, index, middle finger and palm from the moment your hand hovers, held while you hold it |
| Key pinch it | Meta’s Pointable Unity Event Wrapper: When Select calls TriggerPinchPressure(0.3), When Unselect calls RemoveAllHaptics() | Light pressure on the thumb and index finger while you hold it |
| Torch grab it, then put a finger in the flame | Grab: When Select calls TriggerAllHapticsIncrease(0.5). Flame: a SpecialHaptics zone set to Custom Vibrations at 30.6 Hz | Pressure on all six channels while held, and vibration in any finger inside the flame |
| Big red button poke it | Meta’s Interactable Unity Event Wrapper: When Select calls TriggerAllVibrations(10), When Unselect calls RemoveAllVibrations() | 10 Hz vibration on all six channels while pressed |
2. Hospital Tutorial
A patient on a hospital bed. Rest two fingertips on a wrist or the neck to feel a pulse.
| Object | How the haptics are added | What you feel |
|---|---|---|
| Wrist and neck pulse zones | A trigger box collider on each, with SpecialHaptics set to Heart Beat: regular, pressure 0.4, 0.4 s on and 0.3 s off | A steady pulse of about 86 beats a minute in each fingertip in the zone |
3. Water Effects
A fountain and a rain cloud. Reach into them.
| Object | How the haptics are added | What you feel |
|---|---|---|
| Fountain | A trigger capsule collider over the water, with SpecialHaptics set to Fountain | 18 Hz vibration in every fingertip and the palm inside the water |
| Rain | A large trigger capsule collider under the cloud, with SpecialHaptics set to Rain Drop | Brief presses on random fingers, like falling drops. Only the palm starts it, so hold your hand flat under the cloud |
Three ways the scenes add haptics
- A component —
HexRInteractableHapticsbeside Meta’s grab components, with nothing to wire. Foam ball. - Meta’s event wrappers — their When Select and When Unselect events call a method on a Pressure Controller. Key, torch grab, button.
- A trigger zone —
SpecialHapticson a trigger collider, felt by any finger that goes in. Torch flame, pulse, fountain, rain.
How to set up each one in your own project: Haptics setup.