OpenXRDpadBindingModifier
D-pad settings for two-axis input in an OpenXR profile.
OpenXRDpadBindingModifier belongs in OpenXRInteractionProfile.BindingModifiers. ActionSet selects the set; InputPath selects source two-axis input such as /user/hand/right/input/thumbstick. It does not create finished game actions automatically: D-pad directions need map bindings, and the runtime needs XR_EXT_dpad_binding plus XR_KHR_binding_modification. Request it through xr/openxr/binding_modifiers/dpad_binding.
Defaults: Threshold=0.6, ThresholdReleased=0.4, CenterRegion=0.1, WedgeAngle=π/2, IsSticky=false. ActionSet=null, empty InputPath and null haptic references. Range setters accept more than the runtime contract: use finite 0<ThresholdReleased≤Threshold≤1, 0<CenterRegion<1 and 0≤WedgeAngle<π. Validate these requirements, including threshold ordering, in advance. OpenXR extension contract.
C# WedgeAngle uses radians. Pass Mathf.DegToRad(90) for 90°; Inspector degree display does not change API units. Do not pass 90 as an already-radian value.
ActionSet changes without Changed. The other eight setters emit Changed even on repetition. Set and haptic resources remain shared references. Editing parameters does not rebuild an attached XR-session modifier.
Defaults, radians, notifications, references and absent threshold-order validation were checked without a headset. Physical directions, latching, extensions, vibration and runtime map application were not tested.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRDpadBindingModifierConstructor
public OpenXRDpadBindingModifier();Creates a D-pad resource: Threshold=0.6, ThresholdReleased=0.4, CenterRegion=0.1, WedgeAngle=π/2, IsSticky=false, ActionSet=null, empty InputPath and null haptic references. Does not attach the modifier to a profile.
Properties9
ActionSetProperty
public OpenXRActionSet ActionSet { get; set; }Set resource targeted by the D-pad, initially null. The setter stores the reference without Changed, even for a new value. The set must exist in the map and be created in the runtime before applying modification. Assignment neither activates it nor adds the modifier to a profile.
CenterRegionProperty
public float CenterRegion { get; set; }Center-region radius in input-value space, initially 0.1. The setter checks inclusive 0…1; valid runtime bounds are narrower, see the introduction. Supply a finite value. Changed is emitted even on repetition.
InputPathProperty
public string InputPath { get; set; }Full source two-axis input path, initially empty; for example /user/hand/right/input/thumbstick. Neither a D-pad direction subpath nor an action name. The setter stores the string and emits Changed even on repetition; validate path support against the profile/runtime.
IsStickyProperty
public bool IsSticky { get; set; }Latches the first activated region until the underlying input is released; initially false. A runtime parameter, not a local direction calculator. The setter emits Changed even on repetition. Controller behavior was not tested in this run.
OffHapticProperty
public OpenXRHapticBase OffHaptic { get; set; }Feedback resource for modified-input deactivation, initially null. The reference is shared; the setter emits Changed even on repetition. null removes the request. Data for a modifier-capable runtime, not an immediate vibration call.
OnHapticProperty
public OpenXRHapticBase OnHaptic { get; set; }Feedback resource for modified-input activation, initially null. The getter returns the same resource; the setter emits Changed even on repetition. null disables this feedback request. Assignment sends no immediate pulse and establishes no device support.
ThresholdProperty
public float Threshold { get; set; }D-pad activation threshold, initially 0.6. The setter accepts the numeric range 0…1, but full runtime requirements are stricter; see the introduction. Validate finiteness and ordering with ThresholdReleased yourself. Changed is emitted even on repetition.
ThresholdReleasedProperty
public float ThresholdReleased { get; set; }D-pad deactivation threshold, initially 0.4. The setter accepts the numeric range 0…1 without checking ordering against Threshold. Validate the runtime contract, finiteness and the threshold pair; Changed is emitted even on repetition.
WedgeAngleProperty
public float WedgeAngle { get; set; }Region angle in radians, initially π/2. The Inspector displays degrees, but C# setters/getters use radians: pass Mathf.DegToRad(90) for 90°. The setter validates no range and emits Changed even on repetition. See the introduction for valid runtime bounds.
Methods18
GetActionSetOpenXRActionSet
public OpenXRActionSet GetActionSet();The same action-set resource reference, or null; not a runtime handle.
OpenXRActionSetThe same action-set resource reference, or null; not a runtime handle.
GetCenterRegionfloat
public float GetCenterRegion();Stored center-region radius in input units, initially 0.1.
floatStored center-region radius in input units, initially 0.1.
GetInputPathstring
public string GetInputPath();Stored full source-input path, initially empty.
stringStored full source-input path, initially empty.
GetIsStickybool
public bool GetIsSticky();Stored region-latching flag, initially false.
boolStored region-latching flag, initially false.
GetOffHapticOpenXRHapticBase
public OpenXRHapticBase GetOffHaptic();The same deactivation-feedback resource reference, or null.
OpenXRHapticBaseThe same deactivation-feedback resource reference, or null.
GetOnHapticOpenXRHapticBase
public OpenXRHapticBase GetOnHaptic();The same activation-feedback resource reference, or null.
OpenXRHapticBaseThe same activation-feedback resource reference, or null.
GetThresholdfloat
public float GetThreshold();Stored D-pad activation threshold, initially 0.6.
floatStored D-pad activation threshold, initially 0.6.
GetThresholdReleasedfloat
public float GetThresholdReleased();Stored D-pad deactivation threshold, initially 0.4.
floatStored D-pad deactivation threshold, initially 0.4.
GetWedgeAnglefloat
public float GetWedgeAngle();Stored angle in radians, initially π/2. Not Inspector degrees.
floatStored angle in radians, initially π/2. Not Inspector degrees.
SetActionSetvoid
public void SetActionSet(OpenXRActionSet actionSet);Set resource targeted by the D-pad, initially null. The setter stores the reference without Changed, even for a new value. The set must exist in the map and be created in the runtime before applying modification. Assignment neither activates it nor adds the modifier to a profile.
| Name | Type | Default |
|---|---|---|
actionSet | OpenXRActionSet | — |
actionSetMap action-set resource targeted by the D-pad. Neither its string name nor a RID.
SetCenterRegionvoid
public void SetCenterRegion(float centerRegion);Center-region radius in input-value space, initially 0.1. The setter checks inclusive 0…1; valid runtime bounds are narrower, see the introduction. Supply a finite value. Changed is emitted even on repetition.
| Name | Type | Default |
|---|---|---|
centerRegion | float | — |
centerRegionFinite center-region radius in input units; observe runtime bounds.
SetInputPathvoid
public void SetInputPath(string inputPath);Full source two-axis input path, initially empty; for example /user/hand/right/input/thumbstick. Neither a D-pad direction subpath nor an action name. The setter stores the string and emits Changed even on repetition; validate path support against the profile/runtime.
| Name | Type | Default |
|---|---|---|
inputPath | string | — |
inputPathFull path of supported two-axis input, such as /user/hand/right/input/thumbstick.
SetIsStickyvoid
public void SetIsSticky(bool isSticky);Latches the first activated region until the underlying input is released; initially false. A runtime parameter, not a local direction calculator. The setter emits Changed even on repetition. Controller behavior was not tested in this run.
| Name | Type | Default |
|---|---|---|
isSticky | bool | — |
isStickytrue to latch the first region until the underlying input is released.
SetOffHapticvoid
public void SetOffHaptic(OpenXRHapticBase haptic);Feedback resource for modified-input deactivation, initially null. The reference is shared; the setter emits Changed even on repetition. null removes the request. Data for a modifier-capable runtime, not an immediate vibration call.
| Name | Type | Default |
|---|---|---|
haptic | OpenXRHapticBase | — |
hapticOpenXRHapticBase resource, such as OpenXRHapticVibration, or null to disable this request.
SetOnHapticvoid
public void SetOnHaptic(OpenXRHapticBase haptic);Feedback resource for modified-input activation, initially null. The getter returns the same resource; the setter emits Changed even on repetition. null disables this feedback request. Assignment sends no immediate pulse and establishes no device support.
| Name | Type | Default |
|---|---|---|
haptic | OpenXRHapticBase | — |
hapticOpenXRHapticBase resource, such as OpenXRHapticVibration, or null to disable this request.
SetThresholdvoid
public void SetThreshold(float threshold);D-pad activation threshold, initially 0.6. The setter accepts the numeric range 0…1, but full runtime requirements are stricter; see the introduction. Validate finiteness and ordering with ThresholdReleased yourself. Changed is emitted even on repetition.
| Name | Type | Default |
|---|---|---|
threshold | float | — |
thresholdFinite D-pad activation threshold; observe the stricter runtime contract in the introduction.
SetThresholdReleasedvoid
public void SetThresholdReleased(float thresholdReleased);D-pad deactivation threshold, initially 0.4. The setter accepts the numeric range 0…1 without checking ordering against Threshold. Validate the runtime contract, finiteness and the threshold pair; Changed is emitted even on repetition.
| Name | Type | Default |
|---|---|---|
thresholdReleased | float | — |
thresholdReleasedFinite deactivation threshold, no higher than Threshold; observe the runtime contract.
SetWedgeAnglevoid
public void SetWedgeAngle(float wedgeAngle);Region angle in radians, initially π/2. The Inspector displays degrees, but C# setters/getters use radians: pass Mathf.DegToRad(90) for 90°. The setter validates no range and emits Changed even on repetition. See the introduction for valid runtime bounds.
| Name | Type | Default |
|---|---|---|
wedgeAngle | float | — |
wedgeAngleAngle in radians. Convert source degrees with Mathf.DegToRad first; see the introduction for valid bounds.