3D audio doesn't work as intended

Hi there, I’m currently making a 2D side scroller platform game for a project. I’ve implemented the basic FMOD systems and functions and everything works perfectly. However, when I started working on the 3D side, the 3D audio doesn’t play from object position. The 3D audio works perfect when player collide with the objects intended to be collided with, but doesn’t play from the source when player is not moving.

I’ve created a map to store all the FMOD vector with the entity ID that i’ve passed into. Everything looks fine when i print them out on console but nothing seems to be playing from the object’s position.

This function is to set the fmod’s camera and object position. May i know how do i go around fixing this? Thanks!

I can’t see anything wrong with the code snippet you’ve shared, but I don’t have enough information to advise on what could be going wrong. Here are some things to check:

  • Did you set the sound’s mode to FMOD_3D when you created them with System::createSound?
  • Do you have more than one listener?
  • Does setting a different value for the distancefactor in System::set3DSettings make a difference?