Haptics Native SDK
Updated: Nov 25, 2024
Note on public experimental features:
- You are permitted to distribute apps built with Haptics Native SDK on the Store.
- You do not need to put your device in Experimental Mode to use this SDK.
By the end of this guide, you will be able to:
- Explain how and why to use the Haptics Native SDK
- Describe examples how the Haptics Native SDK can be used
- Describe the workflow for designing and integrating haptics with Meta Haptics Studio and Haptics Native SDK
With the Haptics Native SDK you can easily integrate realistic vibrations on Meta Quest and other PCVR controllers by playing back
.haptic
clips created with
Meta Haptics Studio offering pre-built effects, customization options, and support for multiple hardware devices.
A .haptic
clip is a pre-authored haptic pattern created in Meta Haptics Studio that can be played back on a Meta Quest and other PCVR controllers. The haptic pattern contains information about the amplitude, frequency, emphasis and duration of the vibration.
The Haptics SDK provides a unified haptics API. The SDK optimizes the haptic pattern for the used controllers, using high-fidelity haptics when supported by the OpenXR runtime and controllers, and lower fidelity haptics with a fixed vibration frequency or a lower sample rate otherwise. This feature ensures your haptic clips are compatible with all kinds of devices.
This document describes the Haptics Native SDK, which is for integrating the Haptics SDK into native applications. For integrating the SDK into applications based on Unity, use the Haptics SDK for Unity, and for integrating into applications based on Unreal, use the Haptics SDK for Unreal.
How does the Haptics Native SDK work?
The
Haptics SDK plays back haptic patterns in your application, making your controllers vibrate by playing back clips in the
.haptic
format.
- Design your haptics patterns using Meta Haptics Studio.
- Export your designs as
.haptic
files. - Download and install the Haptics Native SDK.
- Import the
.haptic
file. - Build, install and start the application to trigger the event and feel the vibrations.
- The SDK will automatically detect the type of controller being used and adjust the vibrations accordingly.
- The haptic pattern is sent to the controller, triggering it to vibrate.
Additionally, the SDK provides the following features on top:
- Dynamic amplitude and frequency modulation during clip playback.
- Looping clips.
- Support for playing back multiple haptic clips on the same controller at the same time, with manual prioritization, and with automatic resumption of long haptic clips that were interrupted by a shorter haptic clip.
- A hardware-agnostic file format that is forward compatible with future controllers.
The SDK provides a C API so it can be integrated into applications written in C or C++. Other languages that can call into a C API, such as Rust, should also work.