Browse Source

Fix players getting stuck on walls

master
Luna 7 years ago
parent
commit
1d4a44a695
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      scenes/player.tscn
  2. +1
    -1
      scripts/player.gd

+ 1
- 1
scenes/player.tscn View File

@ -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


+ 1
- 1
scripts/player.gd View File

@ -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:


Loading…
Cancel
Save