C Specification
The XrInteractionProfileDpadBindingEXT structure is defined as:
// Provided by XR_EXT_dpad_binding
typedef struct XrInteractionProfileDpadBindingEXT {
XrStructureType type;
const void* next;
XrPath binding;
XrActionSet actionSet;
float forceThreshold;
float forceThresholdReleased;
float centerRegion;
float wedgeAngle;
XrBool32 isSticky;
const XrHapticBaseHeader* onHaptic;
const XrHapticBaseHeader* offHaptic;
} XrInteractionProfileDpadBindingEXT;
Members
Description
The XrInteractionProfileDpadBindingEXT structure is an input struct
that defines how to use any two-axis input to provide dpad-like
functionality to the application.
The struct must be added for each input that should be treated as a dpad to
the XrBindingModificationsKHR::bindingModifications
array in the
XrBindingModificationsKHR structure (See
XR_KHR_binding_modification
extension).
Runtimes are free to ignore any of the fields when not obeying the bindings, but may use it for automatic rebindings of actions.
The implementation must return XR_ERROR_VALIDATION_FAILURE
from
xrSuggestInteractionProfileBindings if any of the following are true:
-
forceThreshold
orforceThresholdReleased
are outside the half-open range (0, 1] -
forceThreshold
<forceThresholdReleased
-
centerRegion
is outside the exclusive range (0, 1) -
wedgeAngle
outside the half-open range [0, π)
If more than one XrInteractionProfileDpadBindingEXT is provided for
the same input identifier, including top level path (e.g.
/user/hand/left/input/thumbstick), and two or more of them specify
the same actionset, the runtime must return
XR_ERROR_VALIDATION_FAILURE
.
If the same input identifier, including top level path, is used for more
than one action set, in addition to inputs being suppressed by higher priority action sets, haptic events from dpads are
also suppressed.
For example, a Valve Index controller binding with a "Walking" action set can have a dpad on each of:
-
left thumbstick
-
right thumbstick
-
left trackpad
-
right trackpad
Another action set can also have a dpad active on each of those inputs, and they can have different settings. If both action sets are active, the higher priority one trumps the lower priority one, and the lower priority one is suppressed.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2024, The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.