Microtube Docs
Developers / Unity / PICO walkthrough

PICO tutorial project

Get the PICO tutorial project and see how each of its three demos adds haptics.

Get the project

The project is on GitHub: HexR-Developer-Tutorial-Pico ↗. Clone it, or use Code → Download ZIP on that page.

shell
git clone https://github.com/MicrotubeTechnologies/HexR-Developer-Tutorial-Pico.git

The demos

One scene holds three demos, and the HexR menu’s DEMOS buttons switch between them. Unity’s XR Interaction Toolkit detects the grab or poke; HEXR decides what the glove does. Select any object in Unity to see its components.

Grab Demo

Four objects to pick up.

The Grab Demo group: apple, key, torch and human heart on a table with their info cards
Apple, key, torch, heart. The apple, key and torch use XRI’s grab; the heart uses HEXR’s own.
ObjectHow the haptics are addedWhat you feel
Apple
pick it up
HexRInteractableHaptics beside the XR Grab InteractablePressure on the thumb, index and middle finger
Key
pinch it
The same componentA pinch on the thumb, index and middle finger
Torch
grab it, then put a finger in the flame
The same component on all channels. Flame: a SpecialHaptics zone set to Custom VibrationsThe whole hand squeezes; a finger in the flame buzzes
Heart
pick it up and hold it
HexRGrabbable picks it up, with no XRI. A SpecialHaptics zone on it set to Heart BeatA slow, steady heartbeat

Rain Demo

A fountain and a rain cloud. Reach into them.

The Rain Demo group: a fountain on a table and a storm cloud raining
Reach into the fountain; hold a flat hand under the cloud.
ObjectHow the haptics are addedWhat you feel
Fountain
put your hand in the water
A SpecialHaptics zone set to FountainA fine spray on every finger and the palm
Rain
hold your palm under the cloud
A SpecialHaptics zone set to Rain DropRandom taps, like drops landing. Only the palm starts it, so hold your hand flat

Puzzle Demo

Light every bulb by pressing the buttons. Each button feels different.

The Puzzle Demo group: three push buttons and a row of light bulbs
Three poke buttons, five bulbs.
ObjectHow the haptics are addedWhat you feel
Button 1
poke it
The XR Simple Interactable’s Select events call TriggerAllVibrations(0.6) and RemoveAllVibrations()A slow pulse on the whole hand
Button 2
poke it
The same events, calling TriggerAllHapticsIncrease(0.4)A steady press
Button 3
poke it
The same events, calling TriggerAllVibrations(10)A 10 Hz buzz

Three ways the demos add haptics

Each one also has a small scene of its own in Assets/Scenes/: 1.Basic Tutorial (component), 2.Special Haptics Tutorial (zones) and 3.Button (events).

How to set up each one in your own project: Haptics setup.