2
0

class_animationnodetimeseek.rst 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimationNodeTimeSeek.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimationNodeTimeSeek:
  6. AnimationNodeTimeSeek
  7. =====================
  8. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A time-seeking animation node to be used with :ref:`AnimationTree<class_AnimationTree>`.
  10. Description
  11. -----------
  12. This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an :ref:`Animation<class_Animation>` from the start or a certain playback position inside the :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its ``seek_position`` value to ``-1.0``.
  13. ::
  14. # Play child animation from the start.
  15. animation_tree.set("parameters/Seek/seek_position", 0.0)
  16. # Alternative syntax (same result as above).
  17. animation_tree["parameters/Seek/seek_position"] = 0.0
  18. # Play child animation from 12 second timestamp.
  19. animation_tree.set("parameters/Seek/seek_position", 12.0)
  20. # Alternative syntax (same result as above).
  21. animation_tree["parameters/Seek/seek_position"] = 12.0
  22. Tutorials
  23. ---------
  24. - :doc:`../tutorials/animation/animation_tree`
  25. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  26. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  27. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`