Unreal haptics setup
How HEXR haptics work, how to add them with components or from Blueprint and C++, and how to make them feel right.
How haptics work
- Touch points. Each tracked hand carries six: a sphere on each fingertip and a box on the palm.
- Components. A HEXR component is a box you size around the part of an object a hand should feel. Every frame it checks which touch points are inside it, so it knows the hand and the finger.
- Channels. The glove has six: Thumb, Index, Middle, Ring, Pinky and Palm. Each one presses (intensity 0.1–1, about 15–50 kPa) or vibrates (0.1–40 Hz).
- Strength. Components take a strength from 10 to 60: 10 is barely there, 60 is firm.
The hand-near check
The Pressure Controller’s calls only fire while the hand is near something: holding it, hovering a finger over it, or inside a HexR Proximity Check. That stops a stray call pressing an empty hand. HEXR components skip the check, because a touch point inside them is proof enough. The Remove calls always work, and your own calls can skip the check (below).
Add haptics without code
Add these in the Components panel like any other component, then size the box in the viewport. The box is hidden in game.
The fastest start: select meshes in the viewport or the Outliner and choose Tools → HexR → Make Selected Grabbable. Each gets physics and a HexR Grabbable sized to it, in one step you can undo.
Pick up an object — HexR Grabbable
For an object whose root is a mesh with Simulate Physics on. Pinch it, or close your palm around it, and every finger touching it presses.
| Setting | What it does |
|---|---|
| Type Of Grab | Pinch Grab (thumb and a finger) or Palm Grab |
| Haptic Strength | How hard the touching fingers are pressed, 10–60 |
| Gravity on Release | Let it fall when let go |
| Grab Target | Grab one part of the actor, such as a heart off its stand. Empty grabs the whole actor |
| Simulate Physics on Release | Drop it with physics when let go, even if it wasn’t simulating |
| Events | On Grabbed, On Grab Released |
Press a button — HexR Physical Button
A button a fingertip pushes in. The finger feels it while the button is down.
| Setting | What it does |
|---|---|
| Index, Thumb, … | Which fingers can press it. Index only by default |
| Cap | The mesh that moves |
| Travel, Press Direction | How far it moves, in centimetres, and which way |
| Press Pressure | How hard the finger is pressed while the button is down, 10–60 |
| Events | On Button Pressed, On Button Released |
Fire, water and a heartbeat — HexR Fire, Water and Heartbeat
| Component | What you feel | Main settings |
|---|---|---|
| HexR Fire | The fingers in the flame buzz. It can be lit and put out, and it switches its flame, sound and light with it | Lit, Frequency (35 Hz), Intensity, Flicker. Can Catch Fire: a torch dipped in a lit fire lights. Water Puts Out. Effects: the flame’s components |
| HexR Water | Pool: a pulse on the way in, a soft hold that slowly swells, a swish when the hand moves. Stream: random drops on the fingers and a fizz in the palm | Mode, Shape (Box, or Cylinder for a round basin or a jet), Splash System, Ripple System, Splash Sound |
| HexR Heartbeat | Lub-dub in the palm and on the fingertips that touch it. With no hand on it, it keeps beating, seen and heard | Rhythm: Healthy (72 BPM), Running (climbs to 150 and drops the second beat) or Uneven (atrial fibrillation). Pulse Target squeezes a mesh on each beat. Lub Sound, Dub Sound |
Their events are On Ignited and On Extinguished (fire), On Splash (water) and On Beat (heartbeat). While the game runs, Ignite, Extinguish and Set Rhythm change them.
Put it back — HexR Return Home
Floats an object back to where it started once it is let go. Pair it with a HexR Grabbable’s Simulate Physics on Release: the object drops, then flies home. Wait After Release (0.8 s) sets how long it waits once no hand is near. Its event is On Returned Home.
Other components
| Component | Use it for |
|---|---|
| HexR Special Haptics | A zone with a ready-made effect, picked in Type Of Haptics: Fountain Effect, Rain Drop Effect, Heart Beat Effect, Hand Squeeze Effect (which fires On Squeezed), Custom Vibrations or Custom Haptics |
| HexR Usable | Events when the chosen fingers curl and uncurl around it, like a spray can’s trigger: On Used and On Stopped Using. Use Threshold sets how far |
| HexR Proximity Check | Opens the hand-near check while a hand is inside, for your own Pressure Controller calls. Clear Delay keeps it open briefly after the hand leaves |
| HexR Interactable Haptics | Pressure while an object is held through an interaction toolkit, following how tightly the hand closes. HEXR adds it to VR Template grabs itself (below). For another toolkit, call Notify Grabbed and Notify Released from its grab and drop events |
Every HEXR component above, except Return Home and Interactable Haptics, also has On Touch Begin and On Touch End. They give the hand, the finger and the touch point: use them for a splash, a sound or a sparkle.
Which component do I need?
| You want | Use |
|---|---|
| To pick something up | HexR Grabbable |
| A button to press | HexR Physical Button |
| Fire, water or a heartbeat to feel | HexR Fire, HexR Water, HexR Heartbeat |
| A VR Template grab to be felt | Nothing: HEXR adds it (below) |
| Something held through another toolkit to be felt | HexR Interactable Haptics |
| A trigger the fingers squeeze | HexR Usable |
| A ready-made rain, fountain or squeeze zone | HexR Special Haptics |
| Your own effect | Blueprint or C++ (below) |
Examples to copy
The plugin comes with a demo level and seven example Blueprints, each with comments on its HEXR parts. To see them, open the Content Browser’s Settings menu, tick Plugin Content and go to Plugins → HexR. The demo level is Demo/L_HexRDemo, and the examples are in Examples.
| Blueprint | What it shows |
|---|---|
| BP_HexR_GrabbableCube | HexR Grabbable, and its On Grabbed event |
| BP_HexR_PushButton | HexR Physical Button with a moving cap, and On Button Pressed / Released |
| BP_HexR_HeartBeat | HexR Special Haptics, Heart Beat Effect: a pulse under the fingertips |
| BP_HexR_RainCloud | HexR Special Haptics, Rain Drop Effect: drops on the palm |
| BP_HexR_Fountain | HexR Special Haptics, Fountain Effect: running water on the fingers |
| BP_HexR_SqueezeBall | HexR Special Haptics, Hand Squeeze Effect, and On Squeezed |
| BP_HexR_SprayCan | HexR Usable: On Used / On Stopped Using as the fingers curl around it and let go |
The tutorial project’s HexR Developer Demo shows Fire, Water, Heartbeat and Return Home together: see The Developer Demo.
VR Template grabs, with no wiring
In a project made from Unreal’s Virtual Reality template, every object with the template’s grab component presses the fingers of the hand holding it. The pressure follows how tightly the hand closes. HEXR finds those objects when play starts, and in anything spawned later. There is nothing to add.
- To tune one object, add your own HexR Interactable Haptics to it. HEXR uses yours instead.
- To leave one out, give the actor the tag
HexRNoAutoHaptics. - To turn it off, untick Auto Haptics for Template Grabs in Project Settings → Plugins → HexR.
Unreal’s own haptics on the gloves
Unreal’s controller haptics, the Play Haptic Effect and Set Haptics by Value nodes, also play on the glove of the same hand. An existing project’s haptic effects are felt with no HEXR calls. Choose how in Project Settings → Plugins → HexR → Unreal Haptics:
- Haptic Effect Mode: Vibration (the default) maps the effect’s frequency onto 8–30 Hz. Pressure presses from 15 to 50 kPa. Off ignores them.
- Haptic Effect Fingers: which channels. All six by default.
- Force Feedback to Gloves: gamepad rumble drives the gloves too. Off by default.
A haptic curve changes every frame, so HEXR sends each glove at most ten updates a second and skips changes too small to feel. A stop always goes out at once.
Trigger haptics from Blueprint
Every HEXR node is in the HexR category of the Blueprint action menu.
- Get Pressure Controller, with a hand, returns that hand’s Pressure Controller. From it: Custom Single Haptics, Custom Single Vibrations, Trigger Pinch Pressure, Remove All Haptics and the rest. These go through the hand-near check.
- Get Glove returns the glove itself: Send Pressure, Send Vibration, Release All Channels and the glove effects. These skip the check.
- On any overlap, Get Touch Point Info says whether the other component is a touch point, and whose.
Trigger haptics from C++
One finger
Press or vibrate one channel through the hand’s Pressure Controller. The last argument skips the hand-near check.
#include "HexRPressureController.h"
#include "HexRTouchPoint.h" // UHexRTouchLibrary
// The level's Pressure Controller for that hand, or null if the pawn has none
UHexRPressureController* Hand = UHexRTouchLibrary::GetPressureController(this, EHexRHand::Right);
if (!Hand) return;
// Pressure: finger, on/off, intensity 0.1-1, ramp speed 0.1-1, skip the hand-near check
Hand->CustomSingleHaptics(EHexRFinger::Index, true, 0.5f, 1.f, false);
// Vibration: finger, on/off, intensity 0.1-1, frequency 0.1-40 Hz, skip the hand-near check
Hand->CustomSingleVibrations(EHexRFinger::Palm, true, 0.7f, 12.f, false);
// A component strength (10-60) as an intensity (0.1-1)
const float Intensity = UHexRTouchLibrary::StrengthToIntensity(30.f);Several fingers
The same setting on several channels at once.
// One entry per channel: Thumb, Index, Middle, Ring, Pinky, Palm
const TArray<bool> Grip = { true, true, true, false, false, false };
Hand->TriggerCustomHapticsIncrease(Grip, 0.6f, 1.f); // pressure 0.1-1, speed 0.1-1
Hand->TriggerCustomVibrations(Grip, 0.7f, 12.f); // intensity 0.1-1, frequency 0.1-40 Hz
Hand->TriggerAllHapticsIncrease(0.5f); // every channel
Hand->TriggerPinchPressure(0.6f); // thumb and index togetherPress the finger that touches
Press exactly the finger that enters your own box, and let go when it leaves.
// Presses exactly the finger or palm that touches Box, and lets go when it leaves.
// Box: a UBoxComponent on your actor with Generate Overlap Events on, overlapping WorldDynamic.
void AMyPad::BeginPlay()
{
Super::BeginPlay();
Box->OnComponentBeginOverlap.AddDynamic(this, &AMyPad::OnTouchBegin);
Box->OnComponentEndOverlap.AddDynamic(this, &AMyPad::OnTouchEnd);
}
void AMyPad::OnTouchBegin(UPrimitiveComponent* Self, AActor* Other, UPrimitiveComponent* Comp,
int32 BodyIndex, bool bFromSweep, const FHitResult& Hit)
{
EHexRHand Hand;
EHexRFinger Finger;
if (UHexRTouchLibrary::GetTouchPointInfo(Comp, Hand, Finger))
{
UHexRTouchLibrary::TriggerFixPressure(Comp, 0.5f); // 0.1-1, skips the hand-near check
}
}
void AMyPad::OnTouchEnd(UPrimitiveComponent* Self, AActor* Other, UPrimitiveComponent* Comp, int32 BodyIndex)
{
EHexRHand Hand;
EHexRFinger Finger;
if (UHexRTouchLibrary::GetTouchPointInfo(Comp, Hand, Finger))
{
UHexRTouchLibrary::RemoveHaptics(Comp);
}
}Letting go
Release one finger, one hand, or the whole glove.
Hand->RemoveIndexHaptics(); // one finger: RemoveThumbHaptics() ... RemovePalmHaptics()
Hand->RemoveAllHaptics(); // every channel's pressure on this hand
Hand->RemoveAllVibrations(); // every channel's vibration on this hand
Glove->ReleaseAllChannels(); // everything on the gloveStraight to the glove
Skip the Pressure Controller and its check.
#include "HexRGlove.h"
// Straight to the glove: no Pressure Controller, no hand-near check.
UHexRGlove* Glove = UHexRTouchLibrary::GetGlove(EHexRHand::Right);
if (Glove && Glove->IsConnected())
{
Glove->SendPressure(EHexRFinger::Index, true, 0.8f, 1.f); // intensity 0.1-1, speed 0.1-1
Glove->SendVibration(EHexRFinger::Palm, true, 18.f, 0.7f); // here frequency comes BEFORE intensity
FHexRChannelState Last = Glove->GetChannelState(EHexRFinger::Index); // what was last sent
}Glove effects
For effects you time yourself, such as a heartbeat or a water drop, the glove has Press, Press Hand, Vibrate, Stop Vibration, Release, Pulse and Pulse Hand. They are in the Blueprint category HexR → Glove → Effects.
Each takes a set of channels, so one call covers a whole hand. A pulse lets go by itself. Short pulses are kept intact even when Bluetooth batches the writes: how.
#include "HexRGlove.h"
// A channel mask (EHexRChannels bits) says which channels, so one call covers a hand.
UHexRGlove* Glove = UHexRTouchLibrary::GetGlove(EHexRHand::Right);
if (!Glove || !Glove->IsConnected()) return;
const int32 Index = HexR::ChannelBit(EHexRFinger::Index);
Glove->Press(HexR::ChannelsFingers, 0.6f); // thumb to pinky, held until released
Glove->Vibrate(Index, 35.f, 0.3f); // frequency 0.1-40 Hz, intensity 0.1-1
Glove->Pulse(HexR::ChannelsAll, 0.8f, 0.1f); // a tap that lets go by itself after 0.1 s
Glove->PulseHand(HexR::ChannelsAll, 0.85f, 0.65f, 0.13f); // palm and fingers at different strengths
Glove->StopVibration(Index); // a channel pressing steadily keeps pressing
Glove->Release(HexR::ChannelsAll); // pressure and vibration offDesigning haptics
Two modes, and a few settings that change how they feel:
| Mode | Setting | What it changes |
|---|---|---|
| Pressure | Intensity 0.1–1 | How hard it presses: about 15 to 50 kPa |
| Pressure | Speed 0.1–1 | How fast it gets there. At 1, about 0.3 s to the firmest press; at 0.1, ten times slower |
| Vibration | 0.1–5 Hz | Separate pulses you can count. Intensity sets how hard each one presses |
| Vibration | 5–40 Hz | A continuous buzz. Intensity sets how long each pulse lasts |
Tips
- Feel it before you build it. Tools → HexR Tools drives any channel with pressure or vibration, so you can find the values you like first.
- Press only the fingers that touch. Each fingertip and the palm has its own touch point, so HEXR knows which one made contact.
- Use the speed for character. A slow ramp suits soft or squashy things; a fast one suits hard contact.
- Scale with the grip. Follow Grip on HexR Interactable Haptics presses harder the tighter the hand closes.
- Use vibration for texture and rhythm. A buzz for running water or a flame, pulses for a heartbeat. HexR Fire, Water and Heartbeat are good starting points.
- Send on events, not every frame. On Quest and PICO, commands go out at most every 100 ms, so calling every frame gains nothing.
- Check what was sent. The HexR menu’s HAPTICS readout shows the last value sent to each channel, and Show Colliders draws the touch points.
Nothing on the glove lets go by itself. HEXR releases on disconnect, when play ends, on pause and on quit. If the app crashes or the link drops, the glove keeps pressing: switch the arm module off.
Try it all in a finished project: Tutorial walkthrough.