Microtube Docs
Developers / Guides / Triggering feedback

Triggering feedback

How to fire haptic feedback at the right moment, and the model behind it.

Haptics triggers

Haptics fire in one of two ways: from events you raise in code — a touch, a grasp, a release — or from physics-based colliders in your scene that trigger feedback on contact. Gate feedback behind these triggers rather than polling every frame.

Warning

Don't send feedback in a tight loop. Calls to a disconnected glove are ignored, but flooding the driver every frame can cause lag. Gate feedback behind your interaction events.

Per-finger pressure

You address feedback per finger, each with an intensity. In Python, build a payload for several fingers at once and write it to the glove:

python
data = haptics.hexr_pressure_multiple(
    ["Thumb","Index","Middle"],   # fingers
    [True, True, True],            # enabled
    [0.6, 0.9, 0.9],               # intensity A (0-1)
    [1.0, 1.0, 1.0])              # intensity B (0-1)
await client.write_gatt_char(CHAR_UUID, data)

In Unity

In the tutorial projects, feedback is triggered from Unity interaction events on the demo objects. The C# helper that maps a touch to actuation is documented in the API reference.

Soon

The exact C# calls for triggering feedback ship with the SDK API reference — for now the tutorial scenes show a working example.