Class OpenXRIPBinding
Defines a binding between an OpenXRAction and an XR input or output.
- Inheritance
-
OpenXRIPBinding
Remarks
This binding resource binds an OpenXRAction to an input or output. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". This would require two binding entries.
Properties
action
OpenXRAction that is bound to binding_path.
var action : OpenXRAction
Property Value
Remarks
- void set_action(OpenXRAction value)
- OpenXRAction get_action
binding_modifiers
Binding modifiers for this binding.
var binding_modifiers : Array = []
Property Value
Remarks
binding_path
Binding path that defines the input or output bound to action.
Note: Binding paths are suggestions, an XR runtime may choose to bind the action to a different input or output emulating this input or output.
var binding_path : String = ""
Property Value
Remarks
paths
Paths that define the inputs or outputs bound on the device.
var paths : PackedStringArray
Property Value
Remarks
- void set_paths(PackedStringArray value)
- PackedStringArray get_paths
Methods
add_path(String)
Add an input/output path to this binding.
void add_path(String path)
Parameters
path
String
get_binding_modifier(int)
Qualifiers: const
Get the OpenXRBindingModifier at this index.
OpenXRActionBindingModifier get_binding_modifier(int index)
Parameters
index
int
get_binding_modifier_count
Qualifiers: const
Get the number of binding modifiers for this binding.
int get_binding_modifier_count
get_path_count
Qualifiers: const
Get the number of input/output paths in this binding.
int get_path_count
has_path(String)
Qualifiers: const
Returns true
if this input/output path is part of this binding.
bool has_path(String path)
Parameters
path
String
remove_path(String)
Removes this input/output path from this binding.
void remove_path(String path)
Parameters
path
String