Adding a "Panning Object" aside from the classic attenuator object of the Studio Listener

So I’ve been facing a strange situation in a narrative 2D game, where I need to have 3 situations at the same time:

  1. Sometimes I might need the studio listener on the camera for certain cinematics
  2. In some other situations I need the panning calculation done from the player position
  3. And some others from the camera as a panning calculation point but the attenuation object being the player

In order to manage all of this, it is a complex system of different audio listeners to activate or deactivate.

Could I request a feature to add an extraordinary “Panning Object” on the Studio Listener to ease this specific situations??? Something completely equal as the atenuation object but for the Panning.

I know it might be confusing because normally you set the Studio Listener component where the hearing point should be, but in my case, I need to shift it depending on the situation and a Panning Object would be really handy.

Thank you

You’ll be glad to know that the existing spatializer effect already supports doing what you want.

You can achieve these two goals simply by moving the listener from one place to another - or, if you’d prefer a more powerful solution, by having multiple listeners, and adjusting their listener weights in order to smoothly change which listener is used for attenuation and panning at any given time.

Spatializers already have this behaviour built-in. To take advantage of it, all you need to do is start specifying the listener position that should be used for attenuation.

See, every listener actually has two sets of 3D attributes: attributes, which is used for panning, and attenuationposition, which is used for attenuation. If attenuationposition is null, attributes is used for both panning and attenuation, so many games only use attributes - but if you want to use different positions for the purposes of attenuation and panning, as you do in your case, you should use both.

Your game should already be calling Studio::System::setListenerAttributes once per frame in order to update the position of your listener as it moves around. All you need to do is start specifying new values for attenuationposition when you do so, instead of just specifying attributes.