From 890857946c096c8e4b72430c2044691e898a4ce7 Mon Sep 17 00:00:00 2001 From: unfa Date: Wed, 7 Apr 2021 01:49:53 +0200 Subject: [PATCH] Tweaked Handgun sound layers attenuation and filtering. --- Game/Assets/Weapons/Handgun/Handgun.tscn | 32 ------------------------ Game/Classes/Audio/SoundPlayer.tscn | 2 ++ Game/Classes/Weapon/Weapon.tscn | 19 ++++++++++++++ 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/Game/Assets/Weapons/Handgun/Handgun.tscn b/Game/Assets/Weapons/Handgun/Handgun.tscn index 5a1792b..596f393 100644 --- a/Game/Assets/Weapons/Handgun/Handgun.tscn +++ b/Game/Assets/Weapons/Handgun/Handgun.tscn @@ -139,44 +139,12 @@ script = ExtResource( 3 ) SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_A.wav" RandomizePitch = 0.05 -[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/A" index="0"] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0 ) -unit_size = 3.0 -emission_angle_enabled = true -emission_angle_degrees = 60.0 -emission_angle_filter_attenuation_db = -6.0 -attenuation_filter_cutoff_hz = 15000.0 -attenuation_filter_db = -6.0 - [node name="B" parent="Sounds/Shoot" instance=ExtResource( 7 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_B.wav" RandomizePitch = 0.05 -[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/B" index="0"] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0 ) -unit_size = 2.0 -emission_angle_enabled = true -emission_angle_degrees = 60.0 -emission_angle_filter_attenuation_db = -6.0 -attenuation_filter_cutoff_hz = 15000.0 -attenuation_filter_db = -6.0 - [node name="C" parent="Sounds/Shoot" instance=ExtResource( 7 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_C.wav" RandomizePitch = 0.05 -[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/C" index="0"] -transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0 ) -emission_angle_enabled = true -emission_angle_degrees = 60.0 -emission_angle_filter_attenuation_db = -6.0 -attenuation_filter_cutoff_hz = 15000.0 -attenuation_filter_db = -6.0 - [editable path="Handgun"] - -[editable path="Sounds/Shoot/A"] - -[editable path="Sounds/Shoot/B"] - -[editable path="Sounds/Shoot/C"] diff --git a/Game/Classes/Audio/SoundPlayer.tscn b/Game/Classes/Audio/SoundPlayer.tscn index aa0054a..3e82c5d 100644 --- a/Game/Classes/Audio/SoundPlayer.tscn +++ b/Game/Classes/Audio/SoundPlayer.tscn @@ -6,3 +6,5 @@ script = ExtResource( 1 ) [node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."] +attenuation_filter_cutoff_hz = 20000.0 +attenuation_filter_db = 0.0 diff --git a/Game/Classes/Weapon/Weapon.tscn b/Game/Classes/Weapon/Weapon.tscn index f332177..552d835 100644 --- a/Game/Classes/Weapon/Weapon.tscn +++ b/Game/Classes/Weapon/Weapon.tscn @@ -139,12 +139,31 @@ script = ExtResource( 6 ) SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_A.wav" RandomizePitch = 0.05 +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/A" index="0"] +unit_size = 0.1 +attenuation_filter_db = -6.0 + [node name="B" parent="Sounds/Shoot" instance=ExtResource( 3 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_B.wav" RandomizePitch = 0.05 +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/B" index="0"] +unit_db = -3.0 +unit_size = 1.5 + [node name="C" parent="Sounds/Shoot" instance=ExtResource( 3 )] SoundClip = "res://Assets/Audio/SFX/Weapons_Handun_Shot_01_C.wav" RandomizePitch = 0.05 +[node name="AudioStreamPlayer3D" parent="Sounds/Shoot/C" index="0"] +unit_db = -3.0 +unit_size = 3.0 +max_db = 6.0 + [editable path="Handgun"] + +[editable path="Sounds/Shoot/A"] + +[editable path="Sounds/Shoot/B"] + +[editable path="Sounds/Shoot/C"]