Version

menu_open
Wwise Unity Integration Documentation
Obstruction and Occlusion

It is possible to obstruct or occlude sounds in Unity. You can either use:

A. Emitter Obstruction/Occlusion

An emitter can be obstructed or occluded in Unity when the AkEmitterObstructionOcclusion component is added to its GameObject. When your map doesn't use spatial audio (that is, it doesn't have any AkRoom components), the AkEmitterObstructionOcclusion component will only use occlusion. In a spatial audio scene, this same component will use obstruction with the spatial audio listener only; the GameObject with the AkSpatialAudioListener component. Emitter obstruction is applied to emitters that are in the same room as the spatial audio listener.

AkEmitterObstructionOcclusion component

To make sure obstruction or occlusion is done on desired objects, use layer masks. For example, you can specify a layer for the player object and exclude it from the AkEmitterObstructionOcclusion component so that the listener's body doesn't obstruct or occlude sounds.

Layer Mask options for the Ak Emitter Obstruction Occlusion component

B. Portal Obstruction

Sound emitted through portals can also be obstructed. If you are not using Spatial Audio Diffraction, you can use the AkRoomPortalObstruction component on the GameObject with an AkRoomPortal.

AkRoomPortalObstruction component

The meshes of Rooms that a Portal is connecting will cause obstruction with the AkRoomPortalObstruction component. If you are using Surface Reflectors, they may obstruct the portal opening too. Make sure you put these in different layers to exclude them from the AkRoomPortalObstruction component's Layer Mask.

Layer Mask options for the Ak Room Portal Obstruction component

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise