OpenXRAnalogThresholdModifier
Analog thresholds and feedback for one binding.
OpenXRAnalogThresholdModifier configures analog-to-boolean conversion on one OpenXRIPBinding. Put it in that binding’s BindingModifiers rather than the profile-level modifier list. The target runtime needs xr/openxr/binding_modifiers/analog_threshold, XR_VALVE_analog_threshold and XR_KHR_binding_modification. Constructing a resource enables no extension.
Defaults are OnThreshold=0.6, OffThreshold=0.4 and null OnHaptic/OffHaptic. For finite values, use 0≤OffThreshold≤OnThreshold≤1; choose strictly lower OffThreshold for hysteresis. The setter checks individual ranges but accepts reversed ordering. That does not make the pair valid for a runtime. See the OpenXR contract.
All four setters emit Changed even for repeated values. Haptic references share resources; null removes the request. Assignment sends no immediate pulse and does not rebuild an attached session.
Defaults, notifications, references and absent ordering validation were checked in the installed engine without a headset. Threshold activation, extension acceptance and physical feedback were not tested. See the action-map guide for map creation and connection order.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRAnalogThresholdModifierConstructor
public OpenXRAnalogThresholdModifier();Creates an analog-threshold resource: OnThreshold=0.6, OffThreshold=0.4 and both haptic references null. Does not add itself to OpenXRIPBinding or enable extensions.
Properties4
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.
OffThresholdProperty
public float OffThreshold { get; set; }Deactivation threshold, initially 0.4. The setter checks the numeric range 0…1, not OnThreshold≥OffThreshold; validate both values together and their finiteness. Changed is emitted even on repetition. A conversion setting, not current analog input.
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.
OnThresholdProperty
public float OnThreshold { get; set; }Activation threshold, initially 0.6. The setter rejects numbers outside 0…1 and emits Changed even on repetition, but does not validate ordering against OffThreshold or every nonfinite input. Use finite OnThreshold≥OffThreshold, strictly greater for hysteresis. Editing the resource does not rebuild an attached session.
Methods8
GetOffHapticOpenXRHapticBase
public OpenXRHapticBase GetOffHaptic();The same deactivation-feedback resource reference, or null.
OpenXRHapticBaseThe same deactivation-feedback resource reference, or null.
GetOffThresholdfloat
public float GetOffThreshold();Stored deactivation threshold, initially 0.4.
floatStored deactivation threshold, initially 0.4.
GetOnHapticOpenXRHapticBase
public OpenXRHapticBase GetOnHaptic();The same activation-feedback resource reference, or null.
OpenXRHapticBaseThe same activation-feedback resource reference, or null.
GetOnThresholdfloat
public float GetOnThreshold();Stored activation threshold, initially 0.6; not current input state.
floatStored activation threshold, initially 0.6; not current input state.
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.
SetOffThresholdvoid
public void SetOffThreshold(float offThreshold);Deactivation threshold, initially 0.4. The setter checks the numeric range 0…1, not OnThreshold≥OffThreshold; validate both values together and their finiteness. Changed is emitted even on repetition. A conversion setting, not current analog input.
| Name | Type | Default |
|---|---|---|
offThreshold | float | — |
offThresholdFinite deactivation threshold in 0…1, no higher than OnThreshold.
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.
SetOnThresholdvoid
public void SetOnThreshold(float onThreshold);Activation threshold, initially 0.6. The setter rejects numbers outside 0…1 and emits Changed even on repetition, but does not validate ordering against OffThreshold or every nonfinite input. Use finite OnThreshold≥OffThreshold, strictly greater for hysteresis. Editing the resource does not rebuild an attached session.
| Name | Type | Default |
|---|---|---|
onThreshold | float | — |
onThresholdFinite activation threshold in 0…1, no lower than OffThreshold.