Переглянути джерело

Typo in C# example change velocity to _velocity

There's a typo in the C# example code:

MoveAndCollide(velocity * delta);

should be 

MoveAndCollide(_velocity * delta);
Zach Ruffin 5 роки тому
батько
коміт
b8c26c2bad
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      tutorials/physics/using_kinematic_body_2d.rst

+ 1 - 1
tutorials/physics/using_kinematic_body_2d.rst

@@ -263,7 +263,7 @@ Attach a script to the KinematicBody2D and add the following code:
         public override void _PhysicsProcess(float delta)
         {
             GetInput();
-            MoveAndCollide(velocity * delta);
+            MoveAndCollide(_velocity * delta);
         }
     }