mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
Use SpeedScale in Player.cs in part 9 of 3d tutorial
The C# alternative for the Godot code, was using a non existing `PlaybackSpeed` property instead of the same property used by the GDScript alternative: speed_scale (SpeedScale in C#). As a result the C# alternative would not run, while the GDScript alternative worked just fine.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user