From 1d4a44a695878cd0816582ad5599a647ba7b282c Mon Sep 17 00:00:00 2001 From: Luna Date: Mon, 19 Feb 2018 19:09:01 -0500 Subject: [PATCH] Fix players getting stuck on walls --- scenes/player.tscn | 2 +- scripts/player.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scenes/player.tscn b/scenes/player.tscn index 5a58122..114ac60 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -104,7 +104,7 @@ bounce = 0.0 gravity_scale = 1.0 custom_integrator = false continuous_cd = true -contacts_reported = 1 +contacts_reported = 3 contact_monitor = true sleeping = false can_sleep = false diff --git a/scripts/player.gd b/scripts/player.gd index fb8d4e6..e36b1a8 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -221,7 +221,7 @@ func control_player(state): # Detect jumpable var jumpable = false - var jump_dot = 0.8 # If normal.dot(up) > jump_dot, we can jump + var jump_dot = 0.5 # If normal.dot(up) > jump_dot, we can jump for i in range(state.get_contact_count()): var n = state.get_contact_local_normal(i) if n.dot(Vector3(0,1,0)) > jump_dot: