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...
OpenXRAction
繼承: Resource < RefCounted < Object
OpenXR 動作。
說明
This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, etc.) and outputs (haptics).
OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return false if the trigger is depressed and true if pressed fully.
Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the reserved path section in the OpenXR specification for more info on the top level paths.
Note that the name of the resource is used to register the action with.
屬性
|
||
|
||
|
列舉
enum ActionType: 🔗
ActionType OPENXR_ACTION_BOOL = 0
該動作提供布林值。
ActionType OPENXR_ACTION_FLOAT = 1
該動作提供 0.0 和 1.0 之間的浮點值,用於扳機等模擬輸入。
ActionType OPENXR_ACTION_VECTOR2 = 2
該動作提供 Vector2 值,可以和嵌入式控制板與操縱桿綁定。
ActionType OPENXR_ACTION_POSE = 3
There is currently no description for this enum. Please help us by contributing one!
屬性說明
ActionType action_type = 1 🔗
void set_action_type(value: ActionType)
ActionType get_action_type()
動作的型別。
該動作的當地語系化描述。
PackedStringArray toplevel_paths = PackedStringArray() 🔗
void set_toplevel_paths(value: PackedStringArray)
PackedStringArray get_toplevel_paths()
該動作所能綁定到的頂級路徑的合集。
Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.