|
Post by illustrator on Oct 22, 2020 10:59:39 GMT
I've been using Ambient sound script and it seems now that ambient sound no longer works. When my character enters the trigger area no sound is playing.
"There's another trigger that follows the Audio Listener (also containing a non-gravity Rigidbody - necessary for the trigger to work) and whenever the 2 triggers hit each other, the sound plays."
I checked and I have non-gravity Rigidbody component in the game object with the Audio listener. Audio listener component is on the object where is character controllers MainCamera. Do I need a collider there too? I checked the Ambient sound setup documentation and it says that I only need to add the Ambient sound component to the object which is going to play ambient sound. There is no mention that I'd need to add other components elsewhere.
I should mention that I did update Unity to the 2020.1.9f1 version but I'm not sure when this problem started.
|
|
|
Post by DarkTonic Dev on Oct 22, 2020 15:41:41 GMT
You don't need to add any other components. Other Game Objects and components are created for you at runtime that follow around the Actor and the Audio Listener. Your actual Audio Listener won't have a RigidBody on it.
The phantom follower objects are located under MasterAudio/_Followers in the Hierarchy.
I just did a test in Unity 2020.1.9 and it still works fine for me.
If the Ambient Sound script doesn't seem to work at all, check the Physics 3d Layer Collision Matrix and make sure that Ignore Raycast layer can collide with itself. That is required for Ambient Sound to work properly.
|
|
|
Post by illustrator on Oct 22, 2020 19:50:38 GMT
Okay thanks. I checked the Physics collision matrix and Ignore raycast layer was set to collide with itself. I then deleted the Master Audio from the plugins folder and reimported from the Asset store and now it's working again so I guess maybe something was broken there.
|
|
|
Post by DarkTonic Dev on Oct 22, 2020 19:53:24 GMT
Ok, well glad that it's working now.
|
|