Browse Source

Merge pull request #1396 from Noshyaar/fps

FPS/Part1: Fix missing param in move_and_slide
Max Hilbrunner 7 years ago
parent
commit
fe71a2e048

BIN
tutorials/3d/fps_tutorial/files/Godot_FPS_Part_1.zip


+ 1 - 1
tutorials/3d/fps_tutorial/part_one.rst

@@ -228,7 +228,7 @@ Add the following code to ``Player.gd``:
         hvel = hvel.linear_interpolate(target, accel*delta)
         hvel = hvel.linear_interpolate(target, accel*delta)
         vel.x = hvel.x
         vel.x = hvel.x
         vel.z = hvel.z
         vel.z = hvel.z
-        vel = move_and_slide(vel,Vector3(0,1,0), 0.05, 4, deg2rad(MAX_SLOPE_ANGLE))
+        vel = move_and_slide(vel,Vector3(0,1,0), true, 0.05, 4, deg2rad(MAX_SLOPE_ANGLE))
         
         
     func _input(event):
     func _input(event):
         if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
         if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: