From 595a1edd3b69ed19d396533ab8b03aece8fce3fb Mon Sep 17 00:00:00 2001
From: smix8 <52464204+smix8@users.noreply.github.com>
Date: Sat, 17 Apr 2021 20:06:32 +0200
Subject: [PATCH] Document AnimationNodeTimeSeek with clarified usage and code
example
Document AnimationNodeTimeSeek with clarified usage and code example
(cherry picked from commit 35c9192689216e61c7425a8ab962a0fe4dfdf58d)
---
doc/classes/AnimationNodeTimeSeek.xml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml
index f9afb2bcb0c..edaa71890e1 100644
--- a/doc/classes/AnimationNodeTimeSeek.xml
+++ b/doc/classes/AnimationNodeTimeSeek.xml
@@ -4,7 +4,18 @@
A time-seeking animation node to be used with [AnimationTree].
- This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1.
+ 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].
+ [codeblock]
+ # Play child animation from the start.
+ animation_tree.set("parameters/Seek/seek_position", 0.0)
+ # Alternative syntax (same result as above).
+ animation_tree["parameters/Seek/seek_position"] = 0.0
+
+ # Play child animation from 12 second timestamp.
+ animation_tree.set("parameters/Seek/seek_position", 12.0)
+ # Alternative syntax (same result as above).
+ animation_tree["parameters/Seek/seek_position"] = 12.0
+ [/codeblock]
https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html