mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
doc: Add a short AnimationPlayer versus Tween comparison
Many newcomers are confused about which one to choose for animating
properties. This should help clarify the situation with regards
to AnimationPlayer versus Tween.
(cherry picked from commit 810b1341ce)
This commit is contained in:
committed by
Rémi Verschelde
parent
0d8b3efeb7
commit
3410dd3a9e
@@ -5,6 +5,7 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
|
||||
[Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
|
||||
Here is a brief usage example that causes a 2D node to move smoothly between two positions:
|
||||
[codeblock]
|
||||
var tween = get_node("Tween")
|
||||
|
||||
Reference in New Issue
Block a user