mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
159 lines
6.7 KiB
ReStructuredText
159 lines
6.7 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_OpenXRAction:
|
|
|
|
OpenXRAction
|
|
============
|
|
|
|
**Hereda:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Una acción de OpenXR.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
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 <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved>`__ for more info on the top level paths.
|
|
|
|
Note that the name of the resource is used to register the action with.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
|
|
| :ref:`ActionType<enum_OpenXRAction_ActionType>` | :ref:`action_type<class_OpenXRAction_property_action_type>` | ``1`` |
|
|
+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
|
|
| :ref:`String<class_String>` | :ref:`localized_name<class_OpenXRAction_property_localized_name>` | ``""`` |
|
|
+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
|
|
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`toplevel_paths<class_OpenXRAction_property_toplevel_paths>` | ``PackedStringArray()`` |
|
|
+---------------------------------------------------+-------------------------------------------------------------------+-------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumeraciones
|
|
--------------------------
|
|
|
|
.. _enum_OpenXRAction_ActionType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **ActionType**: :ref:`🔗<enum_OpenXRAction_ActionType>`
|
|
|
|
.. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_BOOL** = ``0``
|
|
|
|
This action provides a boolean value.
|
|
|
|
.. _class_OpenXRAction_constant_OPENXR_ACTION_FLOAT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_FLOAT** = ``1``
|
|
|
|
This action provides a float value between ``0.0`` and ``1.0`` for any analog input such as triggers.
|
|
|
|
.. _class_OpenXRAction_constant_OPENXR_ACTION_VECTOR2:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_VECTOR2** = ``2``
|
|
|
|
This action provides a :ref:`Vector2<class_Vector2>` value and can be bound to embedded trackpads and joysticks.
|
|
|
|
.. _class_OpenXRAction_constant_OPENXR_ACTION_POSE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_POSE** = ``3``
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this enum. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
|
|
|
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_OpenXRAction_property_action_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`ActionType<enum_OpenXRAction_ActionType>` **action_type** = ``1`` :ref:`🔗<class_OpenXRAction_property_action_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_action_type**\ (\ value\: :ref:`ActionType<enum_OpenXRAction_ActionType>`\ )
|
|
- :ref:`ActionType<enum_OpenXRAction_ActionType>` **get_action_type**\ (\ )
|
|
|
|
El tipo de la acción.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_OpenXRAction_property_localized_name:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`String<class_String>` **localized_name** = ``""`` :ref:`🔗<class_OpenXRAction_property_localized_name>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_localized_name**\ (\ value\: :ref:`String<class_String>`\ )
|
|
- :ref:`String<class_String>` **get_localized_name**\ (\ )
|
|
|
|
The localized description of this action.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_OpenXRAction_property_toplevel_paths:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PackedStringArray<class_PackedStringArray>` **toplevel_paths** = ``PackedStringArray()`` :ref:`🔗<class_OpenXRAction_property_toplevel_paths>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_toplevel_paths**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ )
|
|
- :ref:`PackedStringArray<class_PackedStringArray>` **get_toplevel_paths**\ (\ )
|
|
|
|
A collections of toplevel paths to which this action can be bound.
|
|
|
|
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
|
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
|
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|