Developers / Godot / Quest & PICO walkthrough
Godot tutorial walkthrough
Three ready-to-run scenes for Meta Quest and PICO, and how each one adds its haptics.
Get the project
Clone it
HexR-Developer-Tutorial-Godot ↗. It already holds the HexR addon 0.2.0, the OpenXR Vendors plugin 5.1.0 and Godot XR Tools 4.5.2.
Open it in Godot 4.6+
The first import takes a minute.
Install the Android build template
Project → Install Android Build Template.
Export
Pick the Quest or PICO preset and export, or plug the headset in and use Remote Deploy. Use hand tracking: put the controllers down.
The scenes
1 · Basic Tutorial
| Object | How the haptics are added | What you feel |
|---|---|---|
| Foam | HexRGrabbable, palm grab, strength 20 | A soft press on each finger around it |
| Key | HexRGrabbable, pinch grab, strength 40 | A firm pinch |
| Torch | HexRGrabbable + SpecialHaptics (custom vibrations, 25 Hz) on the flame | Holding it, then a buzz when a fingertip enters the flame |
| Button | HexRPhysicalButton → the bulb’s toggle() | A press on the index while it is down |
| XR Tools ball | XR Tools pickable.tscn + HexRInteractableHaptics | Pressure that follows how hard you squeeze |
2 · Hospital Tutorial
| Object | How the haptics are added | What you feel |
|---|---|---|
| Wrist and neck | SpecialHaptics, heart beat | A pulse under the fingertips |
| Pulse button | HexRPhysicalButton → heartbeat_toggle.gd | Every pulse turns regular or irregular |
| Heart | Heart beat zone (palm included) + hand squeeze zone, squeezing_heart.gd | It beats in your palm; squeeze and it races |
3 · Water Effects
| Object | How the haptics are added | What you feel |
|---|---|---|
| Fountain | SpecialHaptics, fountain | Running water: 18 Hz on the fingers in the jet |
| Rain cloud | SpecialHaptics, rain drop | Random drops on an upturned palm |
Switch scenes from the floating menu’s Scenes section, or from the HexR Companion. Both list Project Settings → HexR → Scenes.
Three ways the scenes add haptics
- Nodes that need no code: grab, button and zones, each an
Area3Dwatching the fingertips. - A toolkit’s pick-up:
HexRInteractableHapticson an XR Tools pickable binds itself to its signals. - A little GDScript: the heart, the pulse toggle and the Remote commands in
scripts/.
The scenes are generated by tools/build_scenes.gd, so their layout and wiring read in one file. Edit the scenes freely; re-running the builder overwrites them.