Unreal tutorial project
Get the Unreal tutorial project, try the HexR Developer Demo and see how each level adds haptics.
Get the project
The Unreal tutorial project is HexR-Developer-Tutorial-Unreal (private preview: ask us for access). It is Unreal’s Virtual Reality template with HEXR added, set up for Meta Quest with passthrough.
Add the plugin
Get the project, then put the plugin in its
Pluginsfolder: unzip the release there, or copyPlugins/HexRfrom HexR-Unreal. You should end up withPlugins/HexR/HexR.uplugin. A copy from the repository has no prebuilt binaries, so Unreal builds it when the project opens, and that needs Visual Studio.Open it in Unreal 5.8
Open
HexRTutorial.uprojectand run Tools → HexR → Validate Project.... Every row is green but the minimum SDK: the project keeps 29 so that it also installs on a PICO 4.Try it in the editor
Connect the gloves in Tools → HexR Tools, then press VR Preview with the headset on Quest Link. The gloves stay connected. Over Link the room doesn’t show, so you see a courtyard instead.
Put it on the headset
Package and install it as in Put the app on the headset. Put the controllers down and use your hands. The gloves connect when the app starts.
The HexR menu switches between the levels below. The VR Template’s own level is on it too, and its grabbable objects press the hand that holds them.
The Developer Demo
The project starts in L_DeveloperDemo, the HexR Developer Demo. It is the Unreal counterpart of the HEXR Sandbox, the demo app for the Unity package, built with Niagara, Blueprints and HEXR components. Four stations stand in an arc in front of you: in your own room on a Quest, or in a small courtyard on a PC.
| Station | What to do | What you feel | Built from |
|---|---|---|---|
| Torch | Grab it by the handle with your palm | Every finger on it pressed while you hold it. Let go and it drops, then floats back to its stand | HexR Grabbable, HexR Return Home |
| Brazier | Touch the flames, then dip the torch’s head in them | The fingers in the fire buzz. After half a second the torch catches; touch its flame too. Hold it in the fountain and it goes out | HexR Fire |
| Fountain | Put a hand in the basin, then under the spout | A pulse on the way in, a soft swelling hold, a swish when you move. Under the spout, random drops on your fingers and a fizz in your palm | HexR Water, Pool and Stream |
| Heart | Rest your hand on it or pick it up; press the buttons | Lub-dub in your palm and fingertips: 72 BPM at rest, climbing to 150 when running, irregular in atrial fibrillation | HexR Heartbeat, HexR Physical Button, HexR Grabbable |
Its Blueprints are in Content/HexRTutorial/DeveloperDemo/Blueprints: BP_DemoTorch, BP_DemoBrazier, BP_DemoFountain and BP_DemoHeart. Open them to see how each is put together. The heart’s rhythm buttons are a three-node graph each. The project’s README explains how to rebuild the demo from the scripts in SourceArt.
The tutorial levels
Three smaller levels, built from the plugin’s example Blueprints.
1. Basic Tutorial
1_BasicTutorial: a cube, a button and a ball on a table.
| Object | Built from | What it does |
|---|---|---|
| Cube | BP_HexR_GrabbableCube: HexR Grabbable, Pinch Grab | Pinch it to pick it up. Each finger on it is pressed |
| Button | BP_HexR_PushButton: HexR Physical Button | Press it with your index. The finger feels it while the button is down |
| Ball | BP_HexR_SqueezeBall: HexR Special Haptics, Hand Squeeze Effect | Close your hand around it to fire On Squeezed, an event for your own logic |
2. Hospital Tutorial
2_HospitalTutorial: a pulse, a syringe and a stress ball.
| Object | Built from | What it does |
|---|---|---|
| Pulse | BP_HexR_HeartBeat: HexR Special Haptics, Heart Beat Effect | Rest your fingertips on it to feel a pulse |
| Syringe | BP_HexR_SprayCan: HexR Usable | Hold it and curl your fingers: On Used and On Stopped Using fire |
| Stress ball | BP_HexR_SqueezeBall: HexR Special Haptics, Hand Squeeze Effect | Squeeze it to fire On Squeezed |
3. Water Effects
3_WaterEffects: a fountain and a rain cloud. Reach into them.
| Object | Built from | What it does |
|---|---|---|
| Fountain | BP_HexR_Fountain: HexR Special Haptics, Fountain Effect | Put your fingers in the stream: they vibrate as if under running water |
| Rain cloud | BP_HexR_RainCloud: HexR Special Haptics, Rain Drop Effect | Hold your palm up under it to feel random drops |
Build your own level
The same kind of level by hand, in about half an hour.
Start the project
In Unreal 5.8, create a project from the Virtual Reality template, or open your own project with a VR pawn.
Add HEXR
Install the plugin and set up the headset as in Project setup.
Give the pawn hands
Choose Tools → HexR → Add HexR Rig to Level, or add the components to the template’s pawn as in Add HEXR to an existing pawn.
Add the objects
Put the objects below on a table in front of the Player Start. Make each component’s box a little larger than the part a finger should feel. Show Touch Points on the tracked hands helps while you place them.
| Object | How the haptics are added | What you feel |
|---|---|---|
| Foam block | A cube with Simulate Physics on, + HexR Grabbable, Palm Grab, Haptic Strength 20 | A soft press on each finger around it |
| Key | A small mesh with Simulate Physics on, + HexR Grabbable, Pinch Grab, Haptic Strength 40 | A firm pinch |
| Button | HexR Physical Button, with Cap set to the button mesh. On Button Pressed toggles a light | A press on the index while it is down |
| Fountain | HexR Water, Mode Stream, Shape Cylinder, around the jet | Random drops on the fingers in the jet, a fizz in the palm |
| Pulse point | HexR Heartbeat, Rhythm Healthy | Lub-dub under the fingertips, 72 times a minute |
| Template cube | One of the VR Template’s grabbable cubes, as it is | Pressure that follows how hard you squeeze |
Three ways the levels add haptics
- Components, no code: the cube, the button, the torch and the fountain. Each is a box that watches the touch points.
- A toolkit’s pick-up: the VR Template’s grabbable objects. HEXR adds HexR Interactable Haptics to them.
- A little Blueprint: the heart’s rhythm buttons call Set Rhythm, and the button’s light listens to On Button Pressed.
Add haptics to your own objects: Haptics setup.