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...
OpenXRIPBinding
继承: Resource < RefCounted < Object
定义 OpenXRAction 和 XR 输入或输出之间的绑定。
描述
该绑定资源将一个 OpenXRAction 绑定到输入或输出。由于大多数控制器都有由相同交互配置处理的左手和右手版本,我们可以指定多个绑定。例如,“开火”动作可以同时绑定到“/user/hand/left/input/trigger”和“/user/hand/right/input/trigger”,需要两个绑定条目。
属性
|
||
|
||
方法
void |
|
get_binding_modifier(index: int) const |
|
get_binding_modifier_count() const |
|
get_path_count() const |
|
void |
remove_path(path: String) |
属性说明
OpenXRAction action 🔗
void set_action(value: OpenXRAction)
OpenXRAction get_action()
与绑定路径 binding_path 绑定的 OpenXRAction。
Array binding_modifiers = []
🔗
该绑定的绑定修改器。
绑定路径,定义与 action 绑定的输入或输出。
注意:绑定路径只是建议,XR 运行时可能会选择将该动作绑定到模拟该输入或输出的不同输入或输出。
PackedStringArray paths 🔗
void set_paths(value: PackedStringArray)
PackedStringArray get_paths()
已弃用: Use binding_path instead.
定义该设备上绑定的输入或输出的路径。
Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.
方法说明
已弃用: Binding is for a single path.
为该绑定添加输入/输出路径。
OpenXRActionBindingModifier get_binding_modifier(index: int) const 🔗
获取位于该索引的 OpenXRBindingModifier。
int get_binding_modifier_count() const 🔗
获取该绑定中绑定修改器的数量。
已弃用: Binding is for a single path.
获取该绑定中输入/输出路径的数量。
bool has_path(path: String) const 🔗
已弃用: Binding is for a single path.
如果该输入/输出路径是该绑定的一部分,则返回 true
。
void remove_path(path: String) 🔗
已弃用: Binding is for a single path.
从该绑定中移除该输入/输出路径。