Added a dampening (lowpass) spatial audio effect for obstacles between the player and the audio source
This commit is contained in:
parent
e147517ad2
commit
47c8576f66
3 changed files with 58 additions and 12 deletions
|
@ -1,8 +1,6 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://ebb4pfxklatj"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ebb4pfxklatj"]
|
||||
|
||||
[ext_resource type="Script" path="res://player/player.gd" id="1_fob34"]
|
||||
[ext_resource type="AudioStream" uid="uid://cs6l2t3jtags8" path="res://assets/sounds/clock-tick-76039.mp3" id="2_p4pcw"]
|
||||
[ext_resource type="Script" path="res://core/audio/spatial_audio_player.gd" id="3_yaiah"]
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_p33ik"]
|
||||
polygon = PackedVector2Array(-9, -9, -9, 9, 9, 9, 9, -9)
|
||||
|
@ -38,9 +36,3 @@ target_position = Vector2(0, -8.1)
|
|||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
polygon = PackedVector2Array(-9, -9, -9, 9, 9, 9, 9, -9)
|
||||
|
||||
[node name="SpatialAudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("2_p4pcw")
|
||||
volume_db = 15.0
|
||||
autoplay = true
|
||||
script = ExtResource("3_yaiah")
|
||||
|
|
Reference in a new issue