AnimationNodeTimeSeek.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0">
  3. <brief_description>
  4. A time-seeking animation node to be used with [AnimationTree].
  5. </brief_description>
  6. <description>
  7. 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 [Animation] from the start or a certain playback position inside the [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 [code]seek_position[/code] value to [code]-1.0[/code].
  8. [codeblocks]
  9. [gdscript]
  10. # Play child animation from the start.
  11. animation_tree.set("parameters/Seek/seek_position", 0.0)
  12. # Alternative syntax (same result as above).
  13. animation_tree["parameters/Seek/seek_position"] = 0.0
  14. # Play child animation from 12 second timestamp.
  15. animation_tree.set("parameters/Seek/seek_position", 12.0)
  16. # Alternative syntax (same result as above).
  17. animation_tree["parameters/Seek/seek_position"] = 12.0
  18. [/gdscript]
  19. [csharp]
  20. // Play child animation from the start.
  21. animationTree.Set("parameters/Seek/seek_position", 0.0);
  22. // Play child animation from 12 second timestamp.
  23. animationTree.Set("parameters/Seek/seek_position", 12.0);
  24. [/csharp]
  25. [/codeblocks]
  26. </description>
  27. <tutorials>
  28. <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
  29. </tutorials>
  30. </class>