Files
godot-docs-l10n/classes/es/class_pathfollow3d.rst

306 lines
13 KiB
ReStructuredText

:github_url: hide
.. _class_PathFollow3D:
PathFollow3D
============
**Hereda:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Una muestra de puntos para un :ref:`Path3D<class_Path3D>`.
.. rst-class:: classref-introduction-group
Descripción
----------------------
This node takes its parent :ref:`Path3D<class_Path3D>`, and returns the coordinates of a point within it, given a distance from the first vertex.
It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the :ref:`progress<class_PathFollow3D_property_progress>` in this node.
.. rst-class:: classref-reftable-group
Propiedades
----------------------
.. table::
:widths: auto
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`cubic_interp<class_PathFollow3D_property_cubic_interp>` | ``true`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`h_offset<class_PathFollow3D_property_h_offset>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`loop<class_PathFollow3D_property_loop>` | ``true`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`progress<class_PathFollow3D_property_progress>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`progress_ratio<class_PathFollow3D_property_progress_ratio>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`RotationMode<enum_PathFollow3D_RotationMode>` | :ref:`rotation_mode<class_PathFollow3D_property_rotation_mode>` | ``3`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`tilt_enabled<class_PathFollow3D_property_tilt_enabled>` | ``true`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`use_model_front<class_PathFollow3D_property_use_model_front>` | ``false`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`v_offset<class_PathFollow3D_property_v_offset>` | ``0.0`` |
+-----------------------------------------------------+---------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Métodos
--------------
.. table::
:widths: auto
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform3D<class_Transform3D>` | :ref:`correct_posture<class_PathFollow3D_method_correct_posture>`\ (\ transform\: :ref:`Transform3D<class_Transform3D>`, rotation_mode\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ ) |static| |
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumeraciones
--------------------------
.. _enum_PathFollow3D_RotationMode:
.. rst-class:: classref-enumeration
enum **RotationMode**: :ref:`🔗<enum_PathFollow3D_RotationMode>`
.. _class_PathFollow3D_constant_ROTATION_NONE:
.. rst-class:: classref-enumeration-constant
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **ROTATION_NONE** = ``0``
Prohíbe que PathFollow3D rote.
.. _class_PathFollow3D_constant_ROTATION_Y:
.. rst-class:: classref-enumeration-constant
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **ROTATION_Y** = ``1``
Permite que PathFollow3D rote sólo en el eje Y.
.. _class_PathFollow3D_constant_ROTATION_XY:
.. rst-class:: classref-enumeration-constant
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **ROTATION_XY** = ``2``
Permite que PathFollow3D rote en los ejes X e Y.
.. _class_PathFollow3D_constant_ROTATION_XYZ:
.. rst-class:: classref-enumeration-constant
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **ROTATION_XYZ** = ``3``
Permite que PathFollow3D rote en cualquier eje.
.. _class_PathFollow3D_constant_ROTATION_ORIENTED:
.. rst-class:: classref-enumeration-constant
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **ROTATION_ORIENTED** = ``4``
Uses the up vector information in a :ref:`Curve3D<class_Curve3D>` to enforce orientation. This rotation mode requires the :ref:`Path3D<class_Path3D>`'s :ref:`Curve3D.up_vector_enabled<class_Curve3D_property_up_vector_enabled>` property to be set to ``true``.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Propiedades
--------------------------------------------------------
.. _class_PathFollow3D_property_cubic_interp:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **cubic_interp** = ``true`` :ref:`🔗<class_PathFollow3D_property_cubic_interp>`
.. rst-class:: classref-property-setget
- |void| **set_cubic_interpolation**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_cubic_interpolation**\ (\ )
If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise.
The points along the :ref:`Curve3D<class_Curve3D>` of the :ref:`Path3D<class_Path3D>` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_h_offset:
.. rst-class:: classref-property
:ref:`float<class_float>` **h_offset** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_h_offset>`
.. rst-class:: classref-property-setget
- |void| **set_h_offset**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_h_offset**\ (\ )
El nodo está desplazado a lo largo de la curva.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_loop:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **loop** = ``true`` :ref:`🔗<class_PathFollow3D_property_loop>`
.. rst-class:: classref-property-setget
- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **has_loop**\ (\ )
Si es ``true``, cualquier desplazamiento fuera de la longitud del camino se envolverá, en lugar de detenerse en los extremos. Úsalo para los caminos cíclicos.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_progress:
.. rst-class:: classref-property
:ref:`float<class_float>` **progress** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_progress>`
.. rst-class:: classref-property-setget
- |void| **set_progress**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_progress**\ (\ )
The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_progress_ratio:
.. rst-class:: classref-property
:ref:`float<class_float>` **progress_ratio** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_progress_ratio>`
.. rst-class:: classref-property-setget
- |void| **set_progress_ratio**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_progress_ratio**\ (\ )
The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length.
It can be set or get only if the **PathFollow3D** is the child of a :ref:`Path3D<class_Path3D>` which is part of the scene tree, and that this :ref:`Path3D<class_Path3D>` has a :ref:`Curve3D<class_Curve3D>` with a non-zero length. Otherwise, trying to set this field will print an error, and getting this field will return ``0.0``.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_rotation_mode:
.. rst-class:: classref-property
:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **rotation_mode** = ``3`` :ref:`🔗<class_PathFollow3D_property_rotation_mode>`
.. rst-class:: classref-property-setget
- |void| **set_rotation_mode**\ (\ value\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ )
- :ref:`RotationMode<enum_PathFollow3D_RotationMode>` **get_rotation_mode**\ (\ )
Permite o prohíbe la rotación en uno o más ejes, dependiendo de las constantes :ref:`RotationMode<enum_PathFollow3D_RotationMode>` que se utilicen.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_tilt_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **tilt_enabled** = ``true`` :ref:`🔗<class_PathFollow3D_property_tilt_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_tilt_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_tilt_enabled**\ (\ )
If ``true``, the tilt property of :ref:`Curve3D<class_Curve3D>` takes effect.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_use_model_front:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **use_model_front** = ``false`` :ref:`🔗<class_PathFollow3D_property_use_model_front>`
.. rst-class:: classref-property-setget
- |void| **set_use_model_front**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_using_model_front**\ (\ )
If ``true``, the node moves on the travel path with orienting the +Z axis as forward. See also :ref:`Vector3.FORWARD<class_Vector3_constant_FORWARD>` and :ref:`Vector3.MODEL_FRONT<class_Vector3_constant_MODEL_FRONT>`.
.. rst-class:: classref-item-separator
----
.. _class_PathFollow3D_property_v_offset:
.. rst-class:: classref-property
:ref:`float<class_float>` **v_offset** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_v_offset>`
.. rst-class:: classref-property-setget
- |void| **set_v_offset**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_v_offset**\ (\ )
El nodo está desplazado perpendicularmente a la curva.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Métodos
------------------------------------------------
.. _class_PathFollow3D_method_correct_posture:
.. rst-class:: classref-method
:ref:`Transform3D<class_Transform3D>` **correct_posture**\ (\ transform\: :ref:`Transform3D<class_Transform3D>`, rotation_mode\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ ) |static| :ref:`🔗<class_PathFollow3D_method_correct_posture>`
Correct the ``transform``. ``rotation_mode`` implicitly specifies how posture (forward, up and sideway direction) is calculated.
.. |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.)`