diff options
| author | Anson Bridges <bridges.anson@gmail.com> | 2022-10-11 00:27:03 -0400 |
|---|---|---|
| committer | Anson Bridges <bridges.anson@gmail.com> | 2022-10-11 00:27:03 -0400 |
| commit | e826b74a104e72ec398aa55bd5dceb13b5a0dae1 (patch) | |
| tree | 712794b30336f7a413502be8e4cc63c288cbc4b6 /godot/scripts | |
| parent | e7fb9bacf3ebb5209f90f412757c35276af51e85 (diff) | |
muh friction!!! soy -_-
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: |
