As of Godot 3.1 and 3.2, setting playback_speed on the AnimationPlayer will have no effect. Apparently the AnimationTree overrides the AnimationPlayer's playback_speed. See bug #22417.
Here is how I worked around it by using a BlendTree node in the AnimationTree state machine:
- Edit the AnimationTree's state machine.
- Delete the old "move_ground" node.
- Add a new BlendTree node and name it "move_ground". Set up the connections with the "idle" and "jump" nodes like before.
- Edit the BlendTree, add a new BlendSpace1D node, which I named "blend_walk_run". Edit it to configure the blending between walk and run animations, just like in the earlier video. Basically you are recreating the old "move_ground" node inside the BlendTree.
- Inside the BlendTree again, add a TimeScale node. I named it "walk_run_speed".
- Click and drag the dots to connect the right side of "blend_walk_run" node to the left side of "walk_run_speed" node, and then from the right side of "walk_run_speed" node to the left side of "output" node.
- In Mannequinny.gd, in func set_move_direction, update the path to set the blend position, because we added a new level in the node hierarchy: animation_tree["parameters/move_ground/blend_walk_run/blend_position"] = direction.length()
- In func set_playback_speed, instead of animation_player.playback_speed = speed, do this: animation_tree["parameters/move_ground/walk_run_speed/scale"] = speed
I hope this helps anyone who was confused about why the animation didn't actually change speed! :)