Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
OpenXRActionMap
继承: Resource < RefCounted < Object
用于 OpenXR 模块的 OpenXRActionSet 和 OpenXRInteractionProfile 资源的合集。
描述
OpenXR 使用类似于 Godots 输入映射系统的动作系统,将各种类型的 XR 控制器上的输入和输出绑定到命名的动作。OpenXR 规范了比 Godot 支持的更多关于这些输入和输出的细节。
另一个重要的区别是 OpenXR 不提供对这些绑定的控制。我们注册的绑定是建议,取决于 XR 运行时是否为用户提供更改这些绑定的能力。如果有新硬件可用,这允许 XR 运行时填补空白。
因此,动作映射需要在启动时加载,之后无法更改。该资源是整个动作映射的容器。
属性
|
||
|
方法
void |
add_action_set(action_set: OpenXRActionSet) |
void |
add_interaction_profile(interaction_profile: OpenXRInteractionProfile) |
void |
|
find_action_set(name: String) const |
|
find_interaction_profile(name: String) const |
|
get_action_set(idx: int) const |
|
get_action_set_count() const |
|
get_interaction_profile(idx: int) const |
|
get_interaction_profile_count() const |
|
void |
remove_action_set(action_set: OpenXRActionSet) |
void |
remove_interaction_profile(interaction_profile: OpenXRInteractionProfile) |
属性说明
OpenXRActionSet 的合集,是该动作映射的一部分。
Array interaction_profiles = []
🔗
OpenXRInteractionProfile 的合集,是该动作映射的一部分。
方法说明
void add_action_set(action_set: OpenXRActionSet) 🔗
添加动作集。
void add_interaction_profile(interaction_profile: OpenXRInteractionProfile) 🔗
添加交互配置。
void create_default_action_sets() 🔗
使用默认动作设置该动作集。
OpenXRActionSet find_action_set(name: String) const 🔗
按名称检索动作集。
OpenXRInteractionProfile find_interaction_profile(name: String) const 🔗
按名称(路径)查找交互配置。
OpenXRActionSet get_action_set(idx: int) const 🔗
获取位于该索引的动作集。
int get_action_set_count() const 🔗
获取动作映射中动作集的数量。
OpenXRInteractionProfile get_interaction_profile(idx: int) const 🔗
获取位于该索引的交互配置。
int get_interaction_profile_count() const 🔗
获取动作映射中交互配置的数量。
void remove_action_set(action_set: OpenXRActionSet) 🔗
移除动作集。
void remove_interaction_profile(interaction_profile: OpenXRInteractionProfile) 🔗
移除交互配置。