Version
menu_open
Wwise Unity Integration Documentation
Obstruction and Occlusion

It is possible to obstruct or occlude sounds in Unity. See the following sections for details:

A. Emitter Obstruction/Occlusion

An emitter can be obstructed or occluded in Unity when the Ak Emitter Obstruction Occlusion component is added to its GameObject. When your map doesn't use spatial audio, that is it doesn't have any Ak Room components, the Ak Emitter Obstruction Occlusion 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 Ak Spatial Audio Listener component. Emitter obstruction is applied to emitters that are in the same room as the spatial audio listener.

  1. Add an Ak Emitter Obstruction Occlusion component to Button Outside.
    1. In Layer Mask, select layers that would block audio. In the SpatialAudioTutorial scene provided with the integration, we have put the first person character on a user created layer called "Player" and the GameObjects with AkRoom or AkRoomPortal components on a user created layer called "Ignore Audio Raycast". These layers are not selected in the Layer Mask option.
      AkEmitterObstructionOcclusion.png
      Ak Emitter Obstruction Occlusion component
      AkEmitterObstructionOcclusionLayerMask.png
      Layer Mask options for the Ak Emitter Obstruction Occlusion component
  2. Play the scene.
    1. Play Button Outside.
    2. Go behind the Barrier GameObject to hear it occluded or obstructed depending on the presence of any GameObjects with the Ak Room component in your scene.

B. Portal Obstruction

Sound emitted through portals can also be obstructed. Use the Ak Room Portal Obstruction component on a game object with an Ak Room Portal component to do so. See section Rooms and Portals Tutorial to add rooms and portals to your scene, if not done already.

  1. Add an Ak Room Portal Obstruction component to Outside Portal.
    1. In Layer Mask, select layers that would block audio. In the SpatialAudioTutorial scene provided with the integration, we have put the the GameObjects with AkRoom components on a user created layer called "Ignore Audio Raycast". This layer is not selected in the Layer Mask option.
      AkRoomPortalObstruction.png
      Ak Room Portal Obstruction component
      AkRoomPortalObstructionLayerMask.png
      Layer Mask options for the Ak Room Portal Obstruction component
  2. Play the scene.
    1. Play Button Small Room.
    2. Go behind the Barrier GameObject to obstruct the portal.

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise