Browse Source

Fixed deprecated gravity and jump.

mitm 7 years ago
parent
commit
cb942da680
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/docs/asciidoc/jme3/beginner/hello_collision.adoc

+ 2 - 2
src/docs/asciidoc/jme3/beginner/hello_collision.adoc

@@ -359,7 +359,7 @@ Now you use the CollisionShape to create a `CharacterControl` that represents th
 
     player.setJumpSpeed(20);
     player.setFallSpeed(30);
-    player.setGravity(30);
+    player.setGravity(new Vector3f(0,-30f,0));
 
 ----
 
@@ -440,7 +440,7 @@ Remember that this class implements the `ActionListener` interface, so you can c
     } else if (binding.equals("Down")) {
       if (value) { down = true; } else { down = false; }
     } else if (binding.equals("Jump")) {
-      player.jump();
+      player.jump(new Vector3f(0,10,0));
     }
   }
 ----