# Set up 3rd listener on 3rd person camera and attenuation on character

**URL:** https://qa.fmod.com/t/set-up-3rd-listener-on-3rd-person-camera-and-attenuation-on-character/15163
**Category:** Unity
**Created:** [October 24, 2019, 1:15pm UTC](https://qa.fmod.com/t/set-up-3rd-listener-on-3rd-person-camera-and-attenuation-on-character/15163 "2019-10-24T13:15:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lewisaudio](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@lewisaudio](https://qa.fmod.com/u/lewisaudio)
#### Post date: [October 24, 2019, 1:15pm UTC](https://qa.fmod.com/t/set-up-3rd-listener-on-3rd-person-camera-and-attenuation-on-character/15163/1 "2019-10-24T13:15:53Z")

</div>

Hi I wish to have panning info sent to my listener on the 3rd person camera and attenuation data being calculated based on the characters position. Is there a simple solution to this? I must stress that my C# implementation skills are quite basic so enhanced details would be appreciated.

Cheers

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [October 30, 2019, 3:42am UTC](https://qa.fmod.com/t/set-up-3rd-listener-on-3rd-person-camera-and-attenuation-on-character/15163/2 "2019-10-30T03:42:00Z")

</div>

You will have to drive the listeners values manually to do this, instead of using a [FMOD Studio Listener component](https://www.fmod.com/resources/documentation-unity?version=2.0&page=game-components.html#studio-listener).

- You will need to make your own script that calls [Studio::System::setListenerAttributes](https://www.fmod.com/resources/documentation-api?version=2.0&page=studio-api-system.html#studio_system_setlistenerattributes).
- This function takes an `FMOD.ATTRIBUTES_3D` which is the same as [FMOD\_3D\_ATTRIBUTES](https://www.fmod.com/resources/documentation-api?version=2.0&page=core-api-common.html#fmod_3d_attributes).
- `FMOD_3D_ATTRIBUTES` has members for: position, velocity, forward and up. You can then drive those how ever you wish.

For example:

```
  GameObject player, camera;
  FMOD.ATTRIBUTES_3D attributes = new FMOD.ATTRIBUTES_3D();
  void Update()
  {
    attributes.position = FMODUnity.RuntimeUtils.ToFMODVector(player.transform.position);
    attributes.forward = FMODUnity.RuntimeUtils.ToFMODVector(camera.transform.forward);
    attributes.up = FMODUnity.RuntimeUtils.ToFMODVector(camera.transform.up);

    FMODUnity.RuntimeManager.StudioSystem.setListenerAttributes(0, attributes);
  }
```
