Microtube Docs
Developers / Getting started / How HEXR works

Getting Started

Set up the HEXR SDK, connect your HEXR glove, trigger your first haptic event, and learn the core concepts for building with HEXR in Unity or Python.

How HEXR Works

HEXR is a haptic glove for VR and mixed reality applications. HEXR provides the haptic feedback, but it does not track your hand or automatically add haptics to an existing application.

To build a HEXR application, you need four components:

  1. Your application

    Build your application using Unity or Python.

    HEXR does not provide a driver that automatically adds haptics to an existing VR application. You integrate the HEXR SDK directly into your own project.

  2. A Bluetooth connection to the glove

    Your application connects directly to the HEXR glove over Bluetooth while it is running.

    In Unity, you can connect using:

    • ConnectLeftBT()
    • ConnectRightBT()

    You can also trigger the connection from a button in your scene.

    Important

    Do not pair the HEXR glove through your computer’s or headset’s Bluetooth settings. Your application manages the Bluetooth connection.

  3. Hand tracking

    HEXR provides haptic feedback, but does not track your hand.

    You need a separate hand-tracking system to determine the position and movement of the user’s hand. This can come from:

    • Meta Quest hand tracking
    • Pico hand tracking
    • HoloLens hand tracking
    • An external tracker such as Leap Motion

    Your hand-tracking system determines where the hand is and what it is doing. The HEXR glove determines what the user feels.

  4. HEXR components on your objects

    HEXR feedback is not automatically applied to objects in your application.

    Add the appropriate HEXR component to each object you want the user to feel. Common components include:

    • HexRGrabbable — for objects the user can grab
    • SpecialHaptics — for custom haptic effects
    • ProximityCheck — for haptics triggered by proximity

    You can then configure the haptic effect, including intensity, speed, and frequency, for individual fingers.

HEXR’s haptic response latency is under 20 ms.

For a hands-on introduction, continue to the Quickstart.

Prerequisites

Before you start, make sure you have the following:

New to HEXR?

You do not need a separate setup application.

  1. Power on the HEXR arm module.
  2. Open your Unity or Python application.
  3. Your application establishes the Bluetooth connection to the glove.

For an overview of the hardware and how the components fit together, see The Kit & Hardware.

Installation

Choose your development platform below.

HEXR is distributed as a Unity package named com.microtube.hexr. It supports Unity 2022.3 or newer.

The package is installed using a Git URL. It is not available through Unity’s Package Registry, so Add package by name will not work.

  1. Open Package Manager

    In Unity, open:

    Window → Package Manager

  2. Install the HEXR package

    Click the + button in the top-left corner and select:

    Add package from git URL…

    Paste the following URL and click Add:

    text
    https://github.com/MicrotubeTechnologies/com.microtube.hexr.git

    Install a specific version

    To use a specific HEXR SDK version, add the version tag to the end of the URL:

    text
    https://github.com/MicrotubeTechnologies/com.microtube.hexr.git#v0.5.1

    Replace v0.5.1 with the version you want to use.

    If you install without a version tag, Unity fetches the package from the repository’s default version.

    To update an existing installation later, open:

    Window → Package Manager → com.microtube.hexr → Update

  3. Set up your XR backend

    HEXR works with different XR backends, but does not install an XR backend for you. Use the backend that matches your project.

    Open:

    HexR → HexR Tools → Project Setup

    Project Setup will check your project and show any required packages that are missing.

    OpenXR

    For OpenXR, the required packages are available through Unity’s Package Registry. Project Setup can install them for you.

    Meta OVR

    For Meta OVR, you first need to add the Meta XR SDK to your Unity account.

    1. Open the free Meta XR All-in-One SDK on the Unity Asset Store.
    2. Click Add to My Assets.
    3. In Unity, open Window → Package Manager.
    4. Select My Assets.
    5. Find Meta XR All-in-One SDK and click Install.
    6. Return to HexR → HexR Tools → Project Setup.
    7. Click Re-scan.

What’s included?

The HEXR package includes everything required to communicate with the glove:

  • HaptGlove runtime
  • Bluetooth support for Windows, Android, and macOS
  • HEXR Unity components and scripts

You do not need to download any additional HEXR runtime or Bluetooth packages.

Clone the Python repo and install its dependencies:

shell
git clone https://github.com/MicrotubeTechnologies/HaptGlovePython.git
cd HaptGlovePython
pip install -r requirements.txt

Then run AddressDiscovery.py to find your glove's Bluetooth address and set it in ExampleHaptics.py.

Note

The Python control library talks to the glove over Bluetooth (BLE) using bleak. It's run from a clone, not yet published as a pip package — adding a pyproject.toml to the repo would enable pip install.

Start with a Tutorial Project

If you prefer to start with a working example instead of setting up a project from scratch, use one of the HEXR tutorial projects below.

Each tutorial includes the HEXR package and a ready-to-run demo scene.

Quickstart

Connect to a glove and fire a short pulse when the user touches an object.

Once the package is installed and you have chosen a backend, these four steps take a scene from empty to working haptics:

  1. Add a hand-tracking rig to your scene

    HEXR attaches to a hand-tracking rig that is already there; it does not create one. Use Meta Building Blocks' Hand Tracking block, or an OpenXR rig with com.unity.xr.hands.

  2. HexR → Create HexR Rig

    Pick Open XR or Meta OVR. This drops in the HexR Main rig and the Pressure Controllers that drive the glove.

  3. HexR → Auto Setup Scene

    Wires the hand roots, fingertip and palm colliders, and the Pressure Controllers together.

  4. HexR → Validate Scene Setup

    Reports anything still unwired before you press Play.

From there, drive the glove directly from any script. PressureTrackerMain is the per-hand haptics controller — one on each Pressure Controller:

csharp
using UnityEngine;
using HaptGlove;
using HexR;

public class TouchPulse : MonoBehaviour
{
    public PressureTrackerMain hand;   // the Left or Right Pressure Controller

    void OnTriggerEnter(Collider other)
    {
        // finger, on, intensity 0.1-1, ramp speed 0.1-1, bypass the hand-near check
        hand.CustomSingleHaptics(Haptics.Finger.Index, true, 0.8f, 1f, false);
    }

    void OnTriggerExit(Collider other)
    {
        hand.CustomSingleHaptics(Haptics.Finger.Index, false, 0f, 1f, false);
    }
}

Most scenes never need this: drop a HexRGrabbable or SpecialHaptics component on an object and it fires haptics from physics alone. See the SDK architecture & API.

On OpenXR

Haptics only fire while HEXR believes a hand is near. On OpenXR the only thing that sets this is a ProximityCheck with a trigger collider on the object — without one, nothing fires and it looks exactly like broken hardware. Meta OVR gets it from its grab and poke interactors instead. Validate Scene Setup flags this.

python
import asyncio
from bleak import BleakClient
from Haptics import Haptics

DEVICE_ADDRESS = "EC:C9:FF:45:92:86"   # your glove (see AddressDiscovery.py)
CHAR_UUID      = "0000ff01-0000-1000-8000-00805f9b34fb"

async def main():
    haptics = Haptics("right")
    async with BleakClient(DEVICE_ADDRESS) as client:
        # All six channels. Fingers are Haptics.Finger members, not strings.
        F = Haptics.Finger
        data = haptics.hexr_pressure_multiple(
            [F.Thumb, F.Index, F.Middle, F.Ring, F.Pinky, F.Palm],   # channels
            [True]*6,                                        # True applies, False releases
            [0.8]*6,                                         # intensity 0.1-1.0
            [1.0]*6)                                         # ramp speed 0.1-1.0
        await client.write_gatt_char(CHAR_UUID, data)
        await asyncio.sleep(5)

asyncio.run(main())
Warning

Always check that a glove is connected before sending events — calls to a disconnected glove are ignored, but polling in a tight loop can flood the driver. Gate feedback behind your interaction callbacks.

Core concepts

Haptics triggers

There are two ways to fire haptics. You can raise an event in your own code, on a touch, a grasp or a release. Or you can let physics do it, by putting a collider on the object so that contact fires the feedback on its own. Use events when you want precise control over the moment, and colliders when you want touch to just work.

Collider-based touch

HEXR puts a trigger collider on each fingertip and on the palm. When one of them overlaps an object's collider, the feedback fires automatically. This is the hands-off route: you feel objects in the scene without writing any event wiring at all.

Actuators & fingers

Each glove exposes soft pneumatic actuators mapped to the fingers. You address feedback per finger, with a target intensity, a speed to reach it, and a frequency for vibration.

ParameterTypeDescription
fingerFingerWhich finger to actuate (Thumb…Pinky)
intensityfloat 0–1Target pressure of the actuation
speedfloat 0–1How fast it ramps to the target intensity — 1 reaches it as fast as possible, 0.1 ramps up slowly
frequency0–40Adds vibration to the actuation — 0 is steady pressure, higher values vibrate faster

Hand-tracking

HEXR does not track your hand on its own — it relies on external hand-tracking, either from your headset (Meta Quest 2/3/3S, Pico 4, HoloLens) or a device like Leap Motion. HEXR adds the touch-feedback layer on top of that tracking.

Next

For the full Unity setup, read Unity integration, then SDK architecture & API for every component and method. For Python, start with Python integration.