From 0ebf0cc39db2a72a738f720e84eaf86c49748dc5 Mon Sep 17 00:00:00 2001 From: William Lim Date: Fri, 18 Nov 2022 16:16:39 +0800 Subject: [PATCH] Update 09.adding_animations.rst Improved documentation for animating the enemies (Mob). --- getting_started/first_3d_game/09.adding_animations.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/getting_started/first_3d_game/09.adding_animations.rst b/getting_started/first_3d_game/09.adding_animations.rst index dd6ba9c527b..df24a2272da 100644 --- a/getting_started/first_3d_game/09.adding_animations.rst +++ b/getting_started/first_3d_game/09.adding_animations.rst @@ -245,10 +245,12 @@ node structure, you can copy them to different scenes. For example, both the *Mob* and the *Player* scenes have a *Pivot* and a *Character* node, so we can reuse animations between them. -Open the *Player* scene, select the animation player node and open the "float" animation. -Next, click on **Animation > Copy**. Then open ``Mob.tscn`` and open its animation -player. Click **Animation > Paste**. That's it; all monsters will now play the float -animation. +Open the *Player* scene, select the AnimationPlayer node and open the "float" +animation. Next, click on **Animation > Copy**. Then open ``Mob.tscn``, +create an AnimationPlayer child node and select it. Click **Animation > Paste** +and make sure that the button with an "A+" icon (Autoplay on Load) and the +looping arrows (Animation looping) are also turned on in the animation editor +in the bottom panel. That's it; all monsters will now play the float animation. We can change the playback speed based on the creature's ``random_speed``. Open the *Mob*'s script and at the end of the ``initialize()`` function, add the