Browse Source

Merge pull request #10983 from JRahmatiNL/patch-1

Use SpeedScale in Player.cs in part 9 of 3d tutorial
Matthew 1 month ago
parent
commit
29991b63a1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      getting_started/first_3d_game/09.adding_animations.rst

+ 2 - 2
getting_started/first_3d_game/09.adding_animations.rst

@@ -451,11 +451,11 @@ Here's the *Player* script.
                 direction = direction.Normalized();
                 // Setting the basis property will affect the rotation of the node.
                 GetNode<Node3D>("Pivot").Basis = Basis.LookingAt(direction);
-                GetNode<AnimationPlayer>("AnimationPlayer").PlaybackSpeed = 4;
+                GetNode<AnimationPlayer>("AnimationPlayer").SpeedScale = 4;
             }
             else
             {
-                GetNode<AnimationPlayer>("AnimationPlayer").PlaybackSpeed = 1;
+                GetNode<AnimationPlayer>("AnimationPlayer").SpeedScale = 1;
             }
 
             // Ground velocity