small changves

This commit is contained in:
Balogh Krisztián 2026-07-26 15:41:31 +02:00
parent 283d9131f0
commit 83cfa97881
5 changed files with 47 additions and 10 deletions

View file

@ -407,8 +407,19 @@ class Soundsource extends SpatialAudio3D:
# Only create raycasts, reverbers and measurement rays when reverb is enabled # Only create raycasts, reverbers and measurement rays when reverb is enabled
if reverb_enabled: if reverb_enabled:
var angle_step = TAU / float(reverb_raycast_count)
for i in range(reverb_raycast_count):
var angle = i * angle_step
# Calculate points in a circle around the Y axis
var target = Vector3(sin(angle), 0, cos(angle)) * max_raycast_distance
raycasts_coords.append(target)
# Add the ceiling (UP) raycast
raycasts_coords.append(Vector3(0, max_raycast_distance, 0))
# create raycasts # create raycasts
var raycast_index = 0 var raycast_index = 0
for c in raycasts_coords: for c in raycasts_coords:
var rc = create_raycast("ray " + name + "#" + str(raycast_index), c) var rc = create_raycast("ray " + name + "#" + str(raycast_index), c)

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b6wlbiittcu48"
path="res://.godot/imported/harmonika-paulstretched.mp3-f6b524b8285c07ba944cf23c69296b8c.mp3str"
[deps]
source_file="res://assets/sounds/ambiance/harmonika-paulstretched.mp3"
dest_files=["res://.godot/imported/harmonika-paulstretched.mp3-f6b524b8285c07ba944cf23c69296b8c.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

View file

@ -72,13 +72,10 @@ UI_MOVEMENT_SENSITIVITY = 1.0
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1317582521] [node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1317582521]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2949467, -3.755646) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2949467, -3.755646)
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1052073765]
stream = ExtResource("2_phkhq")
mix_target = 1
[node name="SpatialAudio3D" type="AudioStreamPlayer3D" parent="." unique_id=351573539] [node name="SpatialAudio3D" type="AudioStreamPlayer3D" parent="." unique_id=351573539]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15.887349, 4.01754, -1.2293816) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15.887349, 4.01754, -1.2293816)
stream = ExtResource("2_phkhq") stream = ExtResource("2_phkhq")
autoplay = true
max_distance = 1927.53 max_distance = 1927.53
script = ExtResource("4_yb1w3") script = ExtResource("4_yb1w3")
occlusion_fadetime = 0.0 occlusion_fadetime = 0.0
@ -86,6 +83,7 @@ bass_proximity = 0
max_raycast_distance = 30 max_raycast_distance = 30
roomsize_multiplicator = 2.0 roomsize_multiplicator = 2.0
prox_reduction = 16.0 prox_reduction = 16.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1656249102] [node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1656249102]

View file

@ -131,7 +131,6 @@ shape = SubResource("CylinderShape3D_g4v7s")
[node name="PlayerListener" type="AudioListener3D" parent="CameraPivot" unique_id=1468948553] [node name="PlayerListener" type="AudioListener3D" parent="CameraPivot" unique_id=1468948553]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7621309, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.7621309, 0)
doppler_tracking = 2 doppler_tracking = 2
current = true
[node name="PlayerUi" parent="." unique_id=454848358 instance=ExtResource("2_rkbax")] [node name="PlayerUi" parent="." unique_id=454848358 instance=ExtResource("2_rkbax")]
@ -175,39 +174,47 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.43042383, -0.90646136, 0)
area_mask = 17 area_mask = 17
doppler_tracking = 2 doppler_tracking = 2
script = ExtResource("62_jbx34") script = ExtResource("62_jbx34")
reverb_volume_db = -12.0
reverb_fadeintime = -1.0
reverb_fadeouttime = -1.0
bass_proximity = 0 bass_proximity = 0
max_raycast_distance = 200 max_raycast_distance = 200
roomsize_multiplicator = 20.0 roomsize_multiplicator = 20.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[node name="LeftFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/LeftFoot" unique_id=368492] [node name="LeftFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/LeftFoot" unique_id=368492]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.032262772, 0.019309282, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.032262772, 0.019309282, 0)
area_mask = 17 area_mask = 17
script = ExtResource("62_jbx34") script = ExtResource("62_jbx34")
reverb_volume_db = -12.0
reverb_fadeintime = -1.0
reverb_fadeouttime = -1.0
bass_proximity = 0 bass_proximity = 0
max_raycast_distance = 200 max_raycast_distance = 200
roomsize_multiplicator = 20.0 roomsize_multiplicator = 20.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[node name="RightFoot" type="AudioStreamPlayer3D" parent="SoundEmitters" unique_id=622217520] [node name="RightFoot" type="AudioStreamPlayer3D" parent="SoundEmitters" unique_id=622217520]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3428033, -0.8860581, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3428033, -0.8860581, 0)
area_mask = 17 area_mask = 17
script = ExtResource("62_jbx34") script = ExtResource("62_jbx34")
reverb_volume_db = -12.0
reverb_fadeintime = -1.0
reverb_fadeouttime = -1.0
bass_proximity = 0 bass_proximity = 0
max_raycast_distance = 200 max_raycast_distance = 200
roomsize_multiplicator = 20.0 roomsize_multiplicator = 20.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[node name="RightFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/RightFoot" unique_id=721446442] [node name="RightFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/RightFoot" unique_id=721446442]
area_mask = 17 area_mask = 17
script = ExtResource("62_jbx34") script = ExtResource("62_jbx34")
reverb_volume_db = -12.0
reverb_fadeintime = -1.0
reverb_fadeouttime = -1.0
bass_proximity = 0 bass_proximity = 0
max_raycast_distance = 200 max_raycast_distance = 200
roomsize_multiplicator = 20.0 roomsize_multiplicator = 20.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[node name="FlashlightSound" type="AudioStreamPlayer3D" parent="SoundEmitters" unique_id=1011459854] [node name="FlashlightSound" type="AudioStreamPlayer3D" parent="SoundEmitters" unique_id=1011459854]
@ -215,10 +222,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.53598464, 0)
max_polyphony = 3 max_polyphony = 3
area_mask = 17 area_mask = 17
script = ExtResource("62_jbx34") script = ExtResource("62_jbx34")
reverb_volume_db = -12.0
reverb_fadeintime = -1.0
reverb_fadeouttime = -1.0
bass_proximity = 0 bass_proximity = 0
max_raycast_distance = 200 max_raycast_distance = 200
roomsize_multiplicator = 20.0 roomsize_multiplicator = 20.0
debug = true
metadata/_custom_type_script = "uid://y8x4svl5kej2" metadata/_custom_type_script = "uid://y8x4svl5kej2"
[connection signal="body_entered" from="CameraPivot/PlayerCamera/GrabbableFinder" to="." method="_on_grabbable_finder_body_entered"] [connection signal="body_entered" from="CameraPivot/PlayerCamera/GrabbableFinder" to="." method="_on_grabbable_finder_body_entered"]