summaryrefslogtreecommitdiff
path: root/doc/classes/AnimationNodeTimeSeek.xml
blob: 50330599277227a66e6643bf375e487cdcdce421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		A time-seeking animation node to be used with [AnimationTree].
	</brief_description>
	<description>
		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 time seek node automatically goes into sleep mode on the next process frame by setting its [code]seek_request[/code] value to [code]-1.0[/code].
		[codeblocks]
		[gdscript]
		# Play child animation from the start.
		animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
		# Alternative syntax (same result as above).
		animation_tree["parameters/TimeSeek/seek_request"] = 0.0

		# Play child animation from 12 second timestamp.
		animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
		# Alternative syntax (same result as above).
		animation_tree["parameters/TimeSeek/seek_request"] = 12.0
		[/gdscript]
		[csharp]
		// Play child animation from the start.
		animationTree.Set("parameters/TimeSeek/seek_request", 0.0);

		// Play child animation from 12 second timestamp.
		animationTree.Set("parameters/TimeSeek/seek_request", 12.0);
		[/csharp]
		[/codeblocks]
	</description>
	<tutorials>
		<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
	</tutorials>
</class>