瀏覽代碼

Recommend not adding nodes as a child of AnimationPlayer

Hugo Locurcio 4 年之前
父節點
當前提交
0f96c47aef
共有 1 個文件被更改,包括 9 次插入6 次删除
  1. 9 6
      tutorials/animation/introduction.rst

+ 9 - 6
tutorials/animation/introduction.rst

@@ -116,17 +116,20 @@ child.
 
 
    Our scene setup
    Our scene setup
 
 
+.. warning::
+
+   AnimationPlayer inherits from Node instead of Node2D or Node3D, which means
+   that the child nodes will not inherit the transform from the parent nodes
+   due to a bare Node being present in the hierarchy.
+
+   Therefore, it is not recommended to add nodes that have a 2D/3D transform
+   as a child of an AnimationPlayer node.
+
 The sprite holds an image texture. We animate that sprite to move
 The sprite holds an image texture. We animate that sprite to move
 between two points on the screen. For this tutorial, use the default Godot
 between two points on the screen. For this tutorial, use the default Godot
 icon as the sprite's texture. As a starting point, move the sprite
 icon as the sprite's texture. As a starting point, move the sprite
 to a left position on the screen.
 to a left position on the screen.
 
 
-.. tip::
-
-   Adding animated nodes as children to the AnimationPlayer node is not
-   required, but it is a nice way of distinguishing animated nodes from
-   non-animated nodes in the Scene Tree.
-
 Select the AnimationPlayer node, then click the "Animation" button in the
 Select the AnimationPlayer node, then click the "Animation" button in the
 animation editor. From the list select "New" (|Add
 animation editor. From the list select "New" (|Add
 Animation|) to add a new animation. And Enter a name for the animation in the
 Animation|) to add a new animation. And Enter a name for the animation in the