diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-14 23:57:36 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-15 09:27:54 -0400 |
commit | af80051334ae2c4ebb2daac60cd4a8ea0e9ce3ed (patch) | |
tree | 3a7a03ee7ba530a3334311075969e3174a4e73b2 /character | |
parent | 52daca0a390c24026462bd59bb72c1b0a716cfd7 (diff) | |
download | godot_wildjam_49-af80051334ae2c4ebb2daac60cd4a8ea0e9ce3ed.tar.gz godot_wildjam_49-af80051334ae2c4ebb2daac60cd4a8ea0e9ce3ed.zip |
add snap to fix the jitters when the boat moves up and down under the player
Diffstat (limited to 'character')
-rw-r--r-- | character/fps_controller/fps_controller.gd | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/character/fps_controller/fps_controller.gd b/character/fps_controller/fps_controller.gd index bc737f5..a344139 100644 --- a/character/fps_controller/fps_controller.gd +++ b/character/fps_controller/fps_controller.gd @@ -54,7 +54,7 @@ func handle_movement(): velocity.y += gravity if velocity.y < term_velocity: velocity.y = term_velocity - velocity = move_and_slide(velocity, Vector3.UP, true, 4, PI/4, false) + velocity = move_and_slide_with_snap(velocity, Vector3.DOWN, Vector3.UP, true, 4, PI/4, false) func _input(event): #Handle mouse movement for camera |