3D sound only updates when an object is moving but not in stationary

Hello. I’ve been figuring it out for hours what causes my problem. when I hit play the initial position of the target object is at the right of the camera so naturally the sound will play on the right side but when I started to move the player/camera it does not update the sound location at all. It keeps playing the sound at the right side of my headset The weird thing is when I started to move the object via editor while its playing. The sound updates its location and properly play the sound where is should be. As soon as I stop moving around the same problem occurs!

I want it to be able to pan the sound in 3D while the target object is stationary and moving.

Here is my code btw.

public class PlaySound : StateMachineBehaviour
{
[EventRef]
public string SoundPath;

EventInstance instance;

public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
    instance = RuntimeManager.CreateInstance(SoundPath);

    instance.start();
}

public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
    instance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(animator.transform.position));
}

public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
    instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
    instance.release();
}

private void OnDestroy()
{
    instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
    instance.release();
}

}

I already tried RuntimeManage.AttachInstanceToGameObject. Still no luck.
I already have FMOD studio listener and the attenuation object is my camera.

This is driving my nuts! I’ve been at it for days and could not make it work. Can someone show me the light and end my misery. I would really be grateful.

Can you check the FMOD.RESULT returned from all the FMOD function calls to see if something isn’t working. Eg:

FMOD.RESULT result = instance.start();
if (result != FMOD.RESULT.OK)
{
    Debug.Log(result);
}

The same for set3DAttributes, stop and release.