Table of Contents

Class OpenXRDpadBindingModifier

The DPad binding modifier converts an axis input to a dpad output.

Inheritance
OpenXRDpadBindingModifier

Remarks

The DPad binding modifier converts an axis input to a dpad output, emulating a DPad. New input paths for each dpad direction will be added to the interaction profile. When bound to actions the DPad emulation will be activated. You should not combine dpad inputs with normal inputs in the same action set for the same control, this will result in an error being returned when suggested bindings are submitted to OpenXR.

See XR_EXT_dpad_binding for in-depth details.

Note: If the DPad binding modifier extension is enabled, all dpad binding paths will be available in the action map. Adding the modifier to an interaction profile allows you to further customize the behavior.

Properties

action_set

Action set for which this dpad binding modifier is active.

var action_set : OpenXRActionSet

Property Value

OpenXRActionSet

Remarks

center_region

Center region in which our center position of our dpad return true.

var center_region : float = 0.1

Property Value

float

Remarks

  • void set_center_region(float value)
  • float get_center_region

input_path

Input path for this dpad binding modifier.

var input_path : String = ""

Property Value

String

Remarks

is_sticky

If false, when the joystick enters a new dpad zone this becomes true.

If true, when the joystick remains in active dpad zone, this remains true even if we overlap with another zone.

var is_sticky : bool = false

Property Value

bool

Remarks

  • void set_is_sticky(bool value)
  • bool get_is_sticky

off_haptic

Haptic pulse to emit when the user releases the input.

var off_haptic : OpenXRHapticBase

Property Value

OpenXRHapticBase

Remarks

on_haptic

Haptic pulse to emit when the user presses the input.

var on_haptic : OpenXRHapticBase

Property Value

OpenXRHapticBase

Remarks

threshold

When our input value is equal or larger than this value, our dpad in that direction becomes true. It stays true until it falls under the threshold_released value.

var threshold : float = 0.6

Property Value

float

Remarks

  • void set_threshold(float value)
  • float get_threshold

threshold_released

When our input value falls below this, our output becomes false.

var threshold_released : float = 0.4

Property Value

float

Remarks

  • void set_threshold_released(float value)
  • float get_threshold_released

wedge_angle

The angle of each wedge that identifies the 4 directions of the emulated dpad.

var wedge_angle : float = 1.5708

Property Value

float

Remarks

  • void set_wedge_angle(float value)
  • float get_wedge_angle