This commit is contained in:
derek
2024-09-25 16:58:40 -05:00
parent 7c45e53502
commit 79600825f5
4 changed files with 53 additions and 3 deletions

View File

@@ -182,8 +182,7 @@ func _physics_process(delta):
var wind_volume = clamp( velocity.length() - 20 ,-20,0)
ear_wind.volume_db = wind_volume
#reset at apex
if abs(velocity.y) < 0:
moving_fast_top_speed = 0.0
#cache fastest speed
if abs(velocity.y) > moving_fast_top_speed:
moving_fast_top_speed = abs(velocity.y)
@@ -191,7 +190,7 @@ func _physics_process(delta):
#Land Sound
if velocity.y < .1 and self.is_on_floor() and moving_fast == true:
print("LAND SOUND")
var land_volume = clamp( moving_fast_top_speed - 20 ,-20,0)
var land_volume = clamp( moving_fast_top_speed - 20 ,-10,0)
land_sound.volume_db = land_volume
land_sound.play()
ear_wind.stop()