# Problems with 3d Panner using GetEvent()

**URL:** https://qa.fmod.com/t/problems-with-3d-panner-using-getevent/11831
**Category:** Unity
**Created:** [February 17, 2015, 7:22pm UTC](https://qa.fmod.com/t/problems-with-3d-panner-using-getevent/11831 "2015-02-17T19:22:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SoundOfSyndrome](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@SoundOfSyndrome](https://qa.fmod.com/u/SoundOfSyndrome)
#### Post date: [February 17, 2015, 7:22pm UTC](https://qa.fmod.com/t/problems-with-3d-panner-using-getevent/11831/1 "2015-02-17T19:22:17Z")

</div>

Hi,

I am using FMOD Studio 1.05.12 and the same unitypackage version on OSX, Yosemite. We are making a 2d-game in Unity. 3D sounds are playing great with PlayOneShot() moderate min & max distance (0.90-50 with default settings) and sounds are fading nicely in and out. Also the FMOD\_StudioEventEmitter plays the sounds correctly.  
My problem is that when I use GetEvent() all the 3D sound are disappearing and only setting the min and max distance to brainless values (like 550-550) it starts to work. The problem is that, the sound is heard everywhere in scene and tweaking the settings does only effect on sound’s volume.

Here is example of not working script:

```
using UnityEngine;
using System.Collections;

public class Troll_Sleeping : NPC {

	public static FMOD.Studio.EventInstance troll_snoring;
	public static FMOD.Studio.EventInstance troll_landingHit;
	//public static FMOD.Studio.ParameterInstance troll_snoringTrigger;

	// Use this for initialization
	void Start () {
		troll_snoring = FMOD_StudioSystem.instance.GetEvent ("event:/Trolls/troll_snoring");
		troll_landingHit = FMOD_StudioSystem.instance.GetEvent ("event:/Trolls/troll_landingHit");
// troll_snoring.getParameter ("Hit", out troll_snoringTrigger);
		troll_snoring.start ();
// troll_snoringTrigger.setValue (0f);
	}

	public override void Triggered(int TriggerNumber = 0)
	{

		troll_snoring.stop (FMOD.Studio.STOP_MODE.IMMEDIATE);
		troll_snoring.release ();
		//troll_snoringTrigger.setValue (1f);
		troll_landingHit.start ();
	}
}

```

Same thing happens when using parameters.

Is there something that I ain’t getting or is this some sort of bug? I remember that this has been working correctly in past.

Thank you in advance!

---

<div class="post-metadata">

### Author: ![nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nick1](https://qa.fmod.com/u/nick1)
#### Post date: [February 17, 2015, 11:56pm UTC](https://qa.fmod.com/t/problems-with-3d-panner-using-getevent/11831/2 "2015-02-17T23:56:46Z")

</div>

If you use GetEvent() you must manually set the event position. Use the Event.set3DAttributes() function. Can use the utility function FMOD.Studio.UnityUtil.to3DAttributes() to convert between a Unity Vector3 or GameObject and the FMOD ATTRIBUTES\_3D type.

---

<div class="post-metadata">

### Author: ![SoundOfSyndrome](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@SoundOfSyndrome](https://qa.fmod.com/u/SoundOfSyndrome)
#### Post date: [February 19, 2015, 8:42am UTC](https://qa.fmod.com/t/problems-with-3d-panner-using-getevent/11831/3 "2015-02-19T08:42:39Z")

</div>

> [@](#):
>
> If you use GetEvent() you must manually set the event position. Use the Event.set3DAttributes() function. Can use the utility function FMOD.Studio.UnityUtil.to3DAttributes() to convert between a Unity Vector3 or GameObject and the FMOD ATTRIBUTES\_3D type.

Thank you, solved the problem!
