瀏覽代碼

make example asteroids spaceship fly up/forward

Hauke 4 年之前
父節點
當前提交
f22934fb2d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tutorials/physics/physics_introduction.rst

+ 2 - 2
tutorials/physics/physics_introduction.rst

@@ -261,7 +261,7 @@ For example, here is the code for an "Asteroids" style spaceship:
 
     extends RigidBody2D
 
-    var thrust = Vector2(0, 250)
+    var thrust = Vector2(0, -250)
     var torque = 20000
 
     func _integrate_forces(state):
@@ -280,7 +280,7 @@ For example, here is the code for an "Asteroids" style spaceship:
 
     class Spaceship : RigidBody2D
     {
-        private Vector2 _thrust = new Vector2(0, 250);
+        private Vector2 _thrust = new Vector2(0, -250);
         private float _torque = 20000;
 
         public override void _IntegrateForces(Physics2DDirectBodyState state)