Spatial 2D sound w/ reverb, first attempt
This commit is contained in:
parent
7833a1c756
commit
3ec5a9edf7
17 changed files with 192 additions and 13 deletions
|
@ -1,6 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://ebb4pfxklatj"]
|
||||
[gd_scene load_steps=6 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)
|
||||
|
@ -9,6 +11,7 @@ polygon = PackedVector2Array(-9, -9, -9, 9, 9, 9, 9, -9)
|
|||
size = Vector2(16, 16)
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
collision_layer = 2
|
||||
floor_block_on_wall = false
|
||||
script = ExtResource("1_fob34")
|
||||
|
||||
|
@ -35,3 +38,12 @@ target_position = Vector2(0, -8.1)
|
|||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="."]
|
||||
polygon = PackedVector2Array(-9, -9, -9, 9, 9, 9, 9, -9)
|
||||
|
||||
[node name="AudioListener2D" type="AudioListener2D" parent="."]
|
||||
|
||||
[node name="SpatialAudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
position = Vector2(0, -8)
|
||||
stream = ExtResource("2_p4pcw")
|
||||
volume_db = 10.0
|
||||
autoplay = true
|
||||
script = ExtResource("3_yaiah")
|
||||
|
|
Reference in a new issue