class_animationnodetimeseek.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeTimeSeek.xml.
  6. .. _class_AnimationNodeTimeSeek:
  7. AnimationNodeTimeSeek
  8. =====================
  9. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A time-seeking animation node used in :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This animation node can be used to cause a seek command to happen to any sub-children of the animation graph. Use to play an :ref:`Animation<class_Animation>` from the start or a certain playback position inside the :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
  15. After setting the time and changing the animation playback, the time seek node automatically goes into sleep mode on the next process frame by setting its ``seek_request`` value to ``-1.0``.
  16. .. tabs::
  17. .. code-tab:: gdscript
  18. # Play child animation from the start.
  19. animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
  20. # Alternative syntax (same result as above).
  21. animation_tree["parameters/TimeSeek/seek_request"] = 0.0
  22. # Play child animation from 12 second timestamp.
  23. animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
  24. # Alternative syntax (same result as above).
  25. animation_tree["parameters/TimeSeek/seek_request"] = 12.0
  26. .. code-tab:: csharp
  27. // Play child animation from the start.
  28. animationTree.Set("parameters/TimeSeek/seek_request", 0.0);
  29. // Play child animation from 12 second timestamp.
  30. animationTree.Set("parameters/TimeSeek/seek_request", 12.0);
  31. .. rst-class:: classref-introduction-group
  32. Tutorials
  33. ---------
  34. - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>`
  35. .. rst-class:: classref-reftable-group
  36. Properties
  37. ----------
  38. .. table::
  39. :widths: auto
  40. +-------------------------+------------------------------------------------------------------------------+----------+
  41. | :ref:`bool<class_bool>` | :ref:`explicit_elapse<class_AnimationNodeTimeSeek_property_explicit_elapse>` | ``true`` |
  42. +-------------------------+------------------------------------------------------------------------------+----------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_AnimationNodeTimeSeek_property_explicit_elapse:
  49. .. rst-class:: classref-property
  50. :ref:`bool<class_bool>` **explicit_elapse** = ``true`` :ref:`🔗<class_AnimationNodeTimeSeek_property_explicit_elapse>`
  51. .. rst-class:: classref-property-setget
  52. - |void| **set_explicit_elapse**\ (\ value\: :ref:`bool<class_bool>`\ )
  53. - :ref:`bool<class_bool>` **is_explicit_elapse**\ (\ )
  54. If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key.
  55. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  56. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  57. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  58. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  59. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  60. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  61. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  62. .. |void| replace:: :abbr:`void (No return value.)`