Seems more reliable than the original method but not perfect
This commit is contained in:
@@ -210,10 +210,11 @@ 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 ,-10,0)
|
||||
var recoil_amount = Vector3(-.1,0,0)
|
||||
land_sound.volume_db = land_volume
|
||||
land_sound.play()
|
||||
recoil.add_recoil(recoil_amount,10,2)
|
||||
moving_fast_top_speed = 0.0
|
||||
moving_fast = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user