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 | |
| parent | e7fb9bacf3ebb5209f90f412757c35276af51e85 (diff) | |
muh friction!!! soy -_-
| -rw-r--r-- | godot/scenes/machines/Cannon.tscn | 4 | ||||
| -rw-r--r-- | godot/scripts/characters/player_controller_new.gd | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/godot/scenes/machines/Cannon.tscn b/godot/scenes/machines/Cannon.tscn index 182ff8a..fa787cd 100644 --- a/godot/scenes/machines/Cannon.tscn +++ b/godot/scenes/machines/Cannon.tscn @@ -46,7 +46,9 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.30877, 0, 0 ) [node name="explosion_sound" type="AudioStreamPlayer3D" parent="YawJoint/PitchJoint/Muzzle"] stream = ExtResource( 2 ) -unit_db = 9.0 +unit_db = 15.0 +max_db = 6.0 +attenuation_filter_db = -49.9 [node name="CameraPoint" type="Spatial" parent="YawJoint/PitchJoint"] transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.873605, 0.291723, 0.0103165 ) 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: |
