License requirement
The functionality described requires a MANUS Bodypack
or a MANUS license dongle
with one of the following licenses:
Core Pro
Core XR
Demo
, or a Feature
license with the OpenXR
feature enabled.
Finger haptics
OpenXR does not natively support finger haptics for glove devices. To enable haptics for finger tracking, the MANUS OpenXR API Layer provides an extension to enable the use of finger haptics. This article explains how to implement finger haptics in OpenXR applications.
Prerequisites
Please make sure to have read the getting started guide for the MANUS OpenXR API Layer. Make sure it's installed and functional. For more information, please refer to the Getting Started guide.
Implementation
The feature is modeled after the xrApplyHapticFeedback function in the OpenXR API, intended for input devices. The MANUS OpenXR API Layer provides a function to apply haptic feedback to the fingers of the glove devices. The function is called xrApplyHapticFeedbackMANUS
.
The xrApplyHapticFeedbackMANUS function is defined as:
XrResult xrApplyHapticFeedbackMANUS(XrSession session,
XrDuration duration,
XrHandEXT side,
XrMANUSFingerAmplitudes amplitudes);
typedef struct XrMANUSFingerAmplitudes {
float thumb;
float index;
float middle;
float ring;
float pinky;
} XrMANUSFingerAmplitudes;
Parameters
session
is the XrSession to start outputting to.duration
is the XrDuration of the haptic feedback in nanoseconds.side
is the XrHandEXT to apply the haptic feedback to.amplitudes
is the XrMANUSFingerAmplitudes struct containing the amplitude for each finger in a range from 0.0 to 1.0.
Description
Trigger a haptic event on the specified hand with the specified duration and amplitude for each finger. The amplitude is a float value between 0.0 and 1.0, where 0.0 is no haptic feedback and 1.0 is the maximum haptic feedback.
If another haptic event for the same hand is happening when this function is called, the new event will override the old event.
Unity
Implementing finger haptics in Unity is unfortunately a bit more involved than we'd like. A custom feature group needs to be created to implement the neccessary calls. We're planning to release this feature in the future, but for now we recommend setting this up yourself.
Otherwise we recommend using our Unity plugin which has built-in support for finger haptics.