Class OpenXRActionMap
Collection of OpenXRActionSet and OpenXRInteractionProfile resources for the OpenXR module.
- Inheritance
-
OpenXRActionMap
Remarks
OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports.
Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available.
The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map.
Properties
action_sets
Collection of OpenXRActionSets that are part of this action map.
var action_sets : Array = []
Property Value
Remarks
interaction_profiles
Collection of OpenXRInteractionProfiles that are part of this action map.
var interaction_profiles : Array = []
Property Value
Remarks
Methods
add_action_set(OpenXRActionSet)
Add an action set.
void add_action_set(OpenXRActionSet action_set)
Parameters
action_set
OpenXRActionSet
add_interaction_profile(OpenXRInteractionProfile)
Add an interaction profile.
void add_interaction_profile(OpenXRInteractionProfile interaction_profile)
Parameters
interaction_profile
OpenXRInteractionProfile
create_default_action_sets
Setup this action set with our default actions.
void create_default_action_sets
find_action_set(String)
Qualifiers: const
Retrieve an action set by name.
OpenXRActionSet find_action_set(String name)
Parameters
name
String
find_interaction_profile(String)
Qualifiers: const
Find an interaction profile by its name (path).
OpenXRInteractionProfile find_interaction_profile(String name)
Parameters
name
String
get_action_set(int)
Qualifiers: const
Retrieve the action set at this index.
OpenXRActionSet get_action_set(int idx)
Parameters
idx
int
get_action_set_count
Qualifiers: const
Retrieve the number of actions sets in our action map.
int get_action_set_count
get_interaction_profile(int)
Qualifiers: const
Get the interaction profile at this index.
OpenXRInteractionProfile get_interaction_profile(int idx)
Parameters
idx
int
get_interaction_profile_count
Qualifiers: const
Retrieve the number of interaction profiles in our action map.
int get_interaction_profile_count
remove_action_set(OpenXRActionSet)
Remove an action set.
void remove_action_set(OpenXRActionSet action_set)
Parameters
action_set
OpenXRActionSet
remove_interaction_profile(OpenXRInteractionProfile)
Remove an interaction profile.
void remove_interaction_profile(OpenXRInteractionProfile interaction_profile)
Parameters
interaction_profile
OpenXRInteractionProfile