Version

menu_open
Attention : vous avez été redirigé vers la plus récente documentation correspondant à votre version générale ( 2023.1.8.8601 ). Si vous souhaitez accéder à la documentation de votre version précise, veuillez télécharger la documentation hors ligne depuis l'Audiokinetic Launcher et sélectionner l'option de documentation Offline dans l'application de création Wwise.
Wwise Unity Integration Documentation
Using the Ak Listener Distance Probe Component to Customize Listeners in Third-Person Games
Note:Before proceeding with this example, refer to Working with Listeners in Third-Person Perspective Games for a general introduction to using Distance Probes in Wwise.

The following example assumes that you have a Unity project that is set up for a third-person perspective game. You must have a camera GameObject that will be used as the listener, and a player character or other GameObject that will be assigned as the Distance Probe. Note that by default, an Ak Audio Listener component is added automatically to the main camera.

  1. Navigate to the GameObject that will be assigned as the Distance Probe. In most cases, this will be the player character GameObject.
    1. Ensure that the Ak Game Obj component is attached to the GameObject. The component can be added by clicking Add Component in the Inspector and choosing Ak Game Obj.
  2. Navigate to the camera GameObject that is used as the listener.

    1. In the Inspector, click on Add Component. Select Ak Listener Distance Probe. If they do not already exist, both the Ak Audio Listener and Ak Game Obj scripts are automatically added to the GameObject.
    2. In the Inspector, navigate to the Ak Listener Distance Probe component. Click on the Distance Probe field to assign the Ak Game Obj that you want to use as the Distance Probe.
      • If the GameObject is not available in the selection menu, then it has not been assigned an Ak Game Obj component. See step 1.

You can now use the Wwise Authoring tool to connect to the game and confirm that the Distance Probe is set up correctly. Refer to Profiling the Distance Probe for details.


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