Browse Source

Clarified use of depricated gravity methods.

mitm 7 năm trước cách đây
mục cha
commit
0c3360fb4a
1 tập tin đã thay đổi với 11 bổ sung3 xóa
  1. 11 3
      src/docs/asciidoc/jme3/advanced/terrain_collision.adoc

+ 11 - 3
src/docs/asciidoc/jme3/advanced/terrain_collision.adoc

@@ -149,7 +149,11 @@ public class HelloTerrainCollision extends SimpleApplication
     player = new CharacterControl(capsuleShape, 0.05f);
     player.setJumpSpeed(20);
     player.setFallSpeed(30);
-    // pre jME3.2
+
+    //Some methods used for setting gravity related variables were deprecated in
+    //the 3.2 version of the engine. Choose the method that matches your version
+    //of the engine.
+    // < jME3.2
     // player.setGravity(30f);
 
     // >= jME3.2
@@ -190,11 +194,15 @@ public class HelloTerrainCollision extends SimpleApplication
     } else if (binding.equals("Down")) {
       if (value) { down = true; } else { down = false; }
     } else if (binding.equals("Jump")) {
-      // pre jME3.2
-      //if (isPressed) { player.jump();}
+      //Some methods used for setting gravity related variables were deprecated in
+      //the 3.2 version of the engine. Choose the method that matches your version
+      //of the engine.
+      // < jME3.2
+      //player.jump();
 
       // >= jME3.2
       player.jump(new Vector3f(0,20f,0));
+
     }
   }