You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en-us/reference/engine/classes/SoundService.yaml
+23-2Lines changed: 23 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -86,8 +86,29 @@ properties:
86
86
capabilities: []
87
87
writeCapabilities: []
88
88
- name: SoundService.DefaultListenerLocation
89
-
summary: ''
90
-
description: ''
89
+
summary: |
90
+
Determines where (if anywhere) to place an `Class.AudioListener` by default.
91
+
description: |
92
+
Determines where to place an `Class.AudioListener` by default.
93
+
If `Class.SoundService.DefaultListenerLocation` is `None`, then no `Class.AudioListener` will be created by default, but `Class.AudioListeners` can be created separately by scripts.
94
+
If `Class.SoundService.DefaultListenerLocation` is `Camera`, then
95
+
- an `Class.AudioListener` will be created and parented-to `Class.Workspace.CurrentCamera`
96
+
- an `Class.AudioDeviceOutput` will be created and parented-to `Class.SoundService`
97
+
- a `Class.Wire` will be created and parented-to the previously-created `Class.AudioListener`
98
+
- `Class.Wire.SourceInstance` will be set to the previously-created `Class.AudioListener`, and `Class.Wire.TargetInstance` will be set to the previously-created `Class.AudioDeviceOutput`
99
+
So, the world will be heard from the perspective (postition and orientation) of your camera.
100
+
101
+
If `Class.SoundService.DefaultListenerLocation` is `Character`, then
102
+
- an `Class.Attachment` will be created and parented-to your `Class.Players.LocalPlayer`'s `Class.Player.Character`'s `Class.Model.PrimaryPart`
103
+
- an `Class.AudioListener` will be created and parented-to the `Class.Attachment`
104
+
- an `Class.AudioDeviceOutput` will be created and parented-to `Class.SoundService`
105
+
- a `Class.Wire` will be created and parented-to the previously-created `Class.AudioListener`
106
+
- `Class.Wire.SourceInstance` will be set to the previously-created `Class.AudioListener`, and `Class.Wire.TargetInstance` will be set to the previously-created `Class.AudioDeviceOutput`
107
+
- the previously-created `Class.Attachment` will be updated once-per-frame to face the same direction as `Class.Workspace.CurrentCamera`
108
+
So, the world will be heard from the position of your character, while matching the orientation of your camera.
109
+
110
+
If `Class.SoundService.DefaultListenerLocation` is `Default`, then its behavior depends on the value of `Class.VoiceChatService.EnableDefaultVoice` and `Class.VoiceChatService.UseAudioApi`.
111
+
When using the default voice setup with the audio API, this behaves similarly to `Camera`.
0 commit comments