Sound not panning correctly in VR with FMOD in Unity

Hi guys!

So I’ve recently started working on this VR project using HTC Vive, and I’ve noticed that I don’t get the sound to pan correctly when using FMOD.

I’ve added a Studio Listener to the VR camera and added an Event Emitter to an object in the scene, but when I play it does not pan when I rotate the headset.

I’ve tried adding Unitys intergrated Audio Listener to the camera and made an Audio Source on the same object and that works just fine.

I’ve also tried this with the Oculus headset and got the same results.

Am I missing something? Do I need some sort of plugin?

I’m using Unity 5.5.2f and FMOD 1.09.03 with the latest Unity Integration pack.

Would really appreciate some help.

Thanks in advance

Both Oculus and Google have plugins that work with FMOD and Unity that a specifically made for VR.

I would highly recommend using one of these for your development as VR uses sound very differently to a normal non-VR game.

Thanks for the answer.

I chose to go with Google VR, and I think I’ve followed all the steps correctly but I still don’t get it to pan correctly.

I started out by making an event in a new project, removing the “3D Panner” on the Master track and added a “GVR Source”. I then went into the Mixing window and added a “GVR Listener” to the Master Bus.

After that I extracted the FMOD Package into Unity, set the project path correctly and clicked “Add plugin” and wrote: “gvraudio”.

I put a “Studio Listener” on my “CameraRig” (which contain the three different cameras used with HTC Vive) and an “Event Emitter” on an object in the scene.

The sound file plays perfectly fine and when I throw around the object the sound pans correctly.

HOWEVER, if the object is standing still and I look around with the VR-headset, the sound does not pan at all.

Example: If I put an object to the right side of the “CameraRig” the sound plays in the right headphone correctly. However, if I turn 180 degrees with the headset the sound should pan to my left headphone since the object is now to my left, but it does NOT. It still stays in my right headphone.

Do you guys know what might be wrong? Have I forgotten something?

I can send some screenshots if it makes it easier.

Really appreciate your help.

It sounds like you may be missing a script that updates the camera rotation.
Google have a few demo projects you can download and compare your “CameraRig” against to see if you are missing anything.

I solved it!

Apparently the [CameraRig] was the wrong place to put the “Studio Listener”.

I clicked the arrow on [CameraRig] and then clicked the arrow on Camera (Head) to see Camera (eye) and Camera (ears).

I found an “Audio Listener” and a “SteamVR Audio” script. I removed both and added a “Studio Listener” there instead.

Now it works perfectly!

tl;dr: Do not put “Studio Listener” on [CameraRig]. Remove “Audio Listener” and “SteamVR Audio” script from Camera (ears) and add “Studio Listener” there instead.

Thanks for the answers, guys. Hope this help someone else aswell.

1 Like