Hello,
I’m working on a 2D game where I’m trying to create audio by distance, so if the player is near, the audio will play louder on the speakers depending on the player/camera position. I attached a FMOD Studio Event Emitter to the object and checked Override Attenuation. However, it seems that it only works when the Min value is 1 and the Max value is 20. If I try to change to anything below 20 for Max Value, it won’t work at all.
Is it the expected behaviour? I’ve checked some topics about that, but none of them seem to work for me. Particulary this one: Studio Event Emitter (Sound by Distance) does not work - #4 by Leah_FMOD
Am I doing something wrong? Or is there maybe something I didn’t understand about that kind of effect? Here are some prints of what I have so far:
Also, should the Spatializer be attached to the Audio or to the Master Track?
I’m using FMOD 2.02.25 and Unity 6.
When you ‘override’ the min/max values from Unity, it uses Studio::EventInstance::setProperty
which will override the distance properties in the event’s macros drawer. When the ‘Distance Override’ is enabled, the settings in the override section are used for that specific spatializer effect instead.
I have created a task to improve the documentation for our Unity integration about this.
If you want everything in the event to be spatialized then you would put it on the Master Track, otherwise you can place it on the audio track if you only want specific sounds spatialized. If you only have one audio track or sound, then either way will behave the same.
Thanks for the reply.
But if I manually change the Min/Max value - either from the Spatializer or the macro - the sounds simply stop playing. I still don’t get why I can have different values for them.
Thank you.
The properties on the Spatializer are specified as ‘override’, and if you turn the override to on then the Min & Max in the macros gets greyed out, to allow for more customization/automation.
Is there anything in the logs when this occurs?
You may need to enable more logging by setting the logging level to 'Log".