Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

OpenXRIPBinding

继承: Resource < RefCounted < Object

定义 OpenXRAction 和 XR 输入或输出之间的绑定。

描述

该绑定资源将一个 OpenXRAction 绑定到输入或输出。由于大多数控制器都有由相同交互配置处理的左手和右手版本,我们可以指定多个绑定。例如,一个动作“开火”可以同时被绑定到“/user/hand/left/input/trigger”和“/user/hand/right/input/trigger”。

属性

OpenXRAction

action

PackedStringArray

paths

PackedStringArray()

方法

void

add_path ( String path )

int

get_path_count ( ) const

bool

has_path ( String path ) const

void

remove_path ( String path )


属性说明

OpenXRAction action

绑定到这些路径的 OpenXRAction


PackedStringArray paths = PackedStringArray()

定义该设备上绑定的输入或输出的路径。


方法说明

void add_path ( String path )

为该绑定添加输入/输出路径。


int get_path_count ( ) const

获取该绑定中输入/输出路径的数量。


bool has_path ( String path ) const

如果该输入/输出路径是该绑定的一部分,则返回 true


void remove_path ( String path )

从该绑定中移除该输入/输出路径。