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.

OpenXRActionSet

繼承: Resource < RefCounted < Object

OpenXRAction 資源的合集,構成動作集。

說明

OpenXR 中的動作集定義了一組可以均勻啟動的動作。這允許遊戲在需要不同輸入或需要重新解釋輸入的不同狀態之間輕鬆切換。例如,我們可以有一個在功能表打開時處於活動狀態的動作集,一個在玩家自由走動時處於活動狀態的動作集,以及一個在玩家控制車輛時處於活動狀態的動作集。

動作集可以包含具有相同名稱的相同動作,如果這些動作集同時處於活動狀態,則具有最高優先順序的動作集定義了哪個綁定是活動的。

屬性

Array

actions

[]

String

localized_name

""

int

priority

0

方法

void

add_action(action: OpenXRAction)

int

get_action_count() const

void

remove_action(action: OpenXRAction)


屬性說明

Array actions = [] 🔗

  • void set_actions(value: Array)

  • Array get_actions()

該動作集中動作的合集。


String localized_name = "" 🔗

  • void set_localized_name(value: String)

  • String get_localized_name()

該動作集的當地語系化名稱。


int priority = 0 🔗

  • void set_priority(value: int)

  • int get_priority()

該動作集的優先順序。


方法說明

void add_action(action: OpenXRAction) 🔗

向該動作集中新增某個動作。


int get_action_count() const 🔗

獲取該動作集中動作的數量。


void remove_action(action: OpenXRAction) 🔗

從該動作集中移除某個動作。