class_animationnodetimeseek.rst 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/AnimationNodeTimeSeek.xml.
  6. .. _class_AnimationNodeTimeSeek:
  7. AnimationNodeTimeSeek
  8. =====================
  9. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A time-seeking animation node to be used with :ref:`AnimationTree<class_AnimationTree>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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``.
  15. ::
  16. # Play child animation from the start.
  17. animation_tree.set("parameters/Seek/seek_position", 0.0)
  18. # Alternative syntax (same result as above).
  19. animation_tree["parameters/Seek/seek_position"] = 0.0
  20. # Play child animation from 12 second timestamp.
  21. animation_tree.set("parameters/Seek/seek_position", 12.0)
  22. # Alternative syntax (same result as above).
  23. animation_tree["parameters/Seek/seek_position"] = 12.0
  24. .. rst-class:: classref-introduction-group
  25. Tutorials
  26. ---------
  27. - :doc:`../tutorials/animation/animation_tree`
  28. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  29. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  30. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  31. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`