|
Post by artaka on Feb 23, 2017 23:30:23 GMT
Hey Brian, Thanks for continuously improving this awesome tool. I do have one question/request.
As I understand it the Listener Follower is for Occlusion. Is it possible to only create the Listener Follower if "Use Occlusion" is ON? Essentially, just add a condition in MasterAudio.cs before line 845 like so:
if (useOcclusion) AmbientUtil.InitListenerFollower();
|
|
|
Post by DarkTonic Dev on Feb 23, 2017 23:58:09 GMT
It's not only for occlusion. It's mainly used by the new Ambient Sound script. Which pretty much everyone should be using since it takes care of common problems.
So in short, no to your question.
Any reason you care about it being there?
|
|
|
Post by artaka on Feb 24, 2017 0:30:09 GMT
I see. I was looking for the most optimal solution to a bug. The issue is that it creates a collider on the default layer that interacts with triggers and other colliders in the level causing bugs. That said, another solution is to put the Listener Follower on a layer where it won't interact with any other physics. Will that cause any issues with sound?
|
|
|
Post by artaka on Feb 24, 2017 0:36:21 GMT
Just add a few more details, it is for a VR project where the player carries the audio listener. The player also has a trigger attached that listens to OnTriggerStay events. So when the collider is created, it triggers the OnTriggerStay event on every frame. It addition, it causes some of the other triggers to fire on enter.
|
|
|
Post by DarkTonic Dev on Feb 24, 2017 0:44:51 GMT
I believe that yes, the solution is to put the entire Master Audio game object (and everything in it) into another layer. I will need to add code to make sure that the layer is copied from MA when the children are created. If you didn't notice, the very next thread under yours is having a similar problem and I believe they can both be fixed that way.
As long as the Listener Follower and any other followers (for Ambient Sound) are in the same layer and can collide with each per the Physics layer matrix, then Ambient Sound will still work properly. I suggest using "Ignore RayCast" layer for this. Please try that layer and let me know if it works for you.
|
|
|
Post by artaka on Feb 24, 2017 0:52:12 GMT
Sounds great. I'll do that. Will keep you posted if I run into any issues.
Thanks!
|
|
|
Post by DarkTonic Dev on Feb 24, 2017 1:03:41 GMT
Thank you.
|
|