diff options
Diffstat (limited to 'godot/scripts')
| -rw-r--r-- | godot/scripts/characters/player_controller_new.gd | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/godot/scripts/characters/player_controller_new.gd b/godot/scripts/characters/player_controller_new.gd index b2af75c..6d45415 100644 --- a/godot/scripts/characters/player_controller_new.gd +++ b/godot/scripts/characters/player_controller_new.gd @@ -291,7 +291,7 @@ func walk(_delta: float) -> void: var projVel = Vector2(velocity.x-floorspeed.x,velocity.z-floorspeed.z).dot(Vector2(direction.x,direction.z)) if is_on_floor: - add_central_force(-mass*_cspeed*linear_velocity.normalized()*c_friction)#friction + add_central_force(-mass*_cspeed*(linear_velocity-floorspeed).normalized()*c_friction)#friction if _speed - _cspeed > 0: add_central_force (mass*Vector3(direction.x*_temp_accel, 0, direction.z*_temp_accel))#velocity.x += direction.x*_temp_accel else: |
