It can be a little confusing. UE4’s traces (ray-casts) are used to determine whether an audio source is occluded from the listener. You can choose which channel the trace uses using the “Occlusion Trace Channel” in the “FMODAudio” settings of an AudioComponent, but that’s only part of the story. You need to understand which scene objects will block traces on the occlusion trace channel you’ve chosen.
Any object which has collision enabled for spatial queries may occlude the audio source. Whether or not such an object does occlude the audio source depends on the collision response setting for the occlusion trace channel in use. For a given object you can see whether or not collisions are enabled and how the collision responses are configured by expanding the “Collision Presets” in the object’s collision settings.
If “Collision Enabled” is “Query Only” or “Collision Enabled” and the collision response for the chosen “Occlusion Trace Channel” is “Block” then the object will occlude the audio source.
So to prevent an object occluding an audio source there are basically three options:
- Choose an “Occlusion Trace Channel” which is not blocked by the object.
- Exclude the object from all spatial queries. I.e. set “Collision Enabled” to “Physics Only”.
- Set the object’s collision response to “Ignore” or “Overlap” for the channel used for occlusion traces.
The first option is may not always be possible as several of the collision presets have their responses set to “Block” for all channels.
Both of the second options may also impact the behavior of other systems in UE4 which may limit when you can use them.
Probably the best option is to add a custom channel just for occlusion traces to your project (see Engine - Collisions in the project settings). You can then use option 3 in conjunction with your custom channel without impacting other systems.