OpenXRActionMap

继承: Resource < RefCounted < Object

Collection of OpenXRActionSet and OpenXRInteractionProfile resources for the OpenXR module.

描述

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.

属性

方法


属性说明

Array action_sets = []

  • void set_action_sets ( value: Array )
  • Array get_action_sets ( )

Collection of OpenXRActionSet s that are part of this action map.


Array interaction_profiles = []

  • void set_interaction_profiles ( value: Array )
  • Array get_interaction_profiles ( )

Collection of OpenXRInteractionProfile s that are part of this action map.


方法说明

void add_action_set ( action_set: OpenXRActionSet )

Add an action set.


void add_interaction_profile ( interaction_profile: OpenXRInteractionProfile )

Add an interaction profile.


void create_default_action_sets ( )

Setup this action set with our default actions.


OpenXRActionSet find_action_set ( name: String ) const1

Retrieve an action set by name.


OpenXRInteractionProfile find_interaction_profile ( name: String ) const1

Find an interaction profile by its name (path).


OpenXRActionSet get_action_set ( idx: int ) const1

Retrieve the action set at this index.


int get_action_set_count ( ) const1

Retrieve the number of actions sets in our action map.


OpenXRInteractionProfile get_interaction_profile ( idx: int ) const1

Get the interaction profile at this index.


int get_interaction_profile_count ( ) const1

Retrieve the number of interaction profiles in our action map.


void remove_action_set ( action_set: OpenXRActionSet )

Remove an action set.


void remove_interaction_profile ( interaction_profile: OpenXRInteractionProfile )

Remove an interaction profile.

2

本方法通常需要用户覆盖才能生效。

1

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。