Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

0 votes
Hi everyone,

First of all, excuse my English. I'll try to make myself understandable.
I use Unity 2019 linked to Wwise 2019

What i would like to do :

- My FPS controller goes inside any 3D object (this is okay)
- Going on this area trigger a sound with a Ak trigger Enter script. (this is okay)
- The sound's source i want to trigger has to be on an other game object than the 3D object I just use for the AK trigger enter script. (this is my issue :p)

Thanks for your responses
in General Discussion by Paul R. (100 points)

1 Answer

+1 vote

Hey Paul, 

If you are using an AkEvent, and you've set the Trigger On to AkTriggerEnter, the "Use other gameobject" (enabled) will be posted on the game object that enters the trigger. Does this help? 
If not, I'd make a script that specifies what game object you will be posting it on to. Something like this...

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PostEventOnOtherGameObject : MonoBehaviour
{
     public AK.Wwise.Event MyEvent;
     public GameObject otherGameObject;
     private void OnTriggerEnter(Collider other)
     {

          MyEvent.Post(otherGameObject);
     }
}

Let us know if it helps! :) 

by Mads Maretty S. (Audiokinetic) (40.2k points)
...