So I have a game, where there is an object that is emitting sounds and is moving very fast. The listener is following this object, and when the velocity becomes too high the sound starts cutting out dissapearing entirely. (By fast I mean well over 100m/s)
Is there any way to resolve this issue? If I had to guess something is conflicting in the update order of things.
Hi,
Thank you for sharing the information.
I was not able to reproduce the issue on my end, so could you please let me know which FMOD version you are using?
Also, could you please elaborate a bit more on your setup? For example:
- whether the emitter has a Rigidbody
- how you are playing the sound (StudioEventEmitter, PlayOneShotAttached, or manual set3DAttributes.)
- how the listener is following the object
A small repro or video would be super helpful too.
Hi sorry, I have been busy lately but now I’m here, and I think I found the problem.
I’m using Cinemachine camera to follow a high speed object, which gets updated in LateUpdate. This causes the sounds (only the spatialized ones) to “flicker”. Nothing else besides this one fact matters as I have found.
How to reproduce:
- Create a Camera
- Put a CineMachine Brain on the camera
- Create a Cube with a studio event emitter that is spatialized, and set the Event Play Trigger to Object Start
- Add a rigidbody to the cube
- Add a CineMachine Camera as a child of the cube.
- Press play
Thank you for the additional details and repro steps.
This actually looks very similar to the following Cinemachine-related listener velocity issue:
In short, the issue appears to be related to the FMOD Studio Listener transform being affected by the Cinemachine-driven camera update during very fast movement.
Could you please try the workaround/testing suggestions from that thread and let me know whether they improve the flickering on your end as well?
Also, could you please confirm which FMOD Studio and FMOD Unity integration versions you are using?
You can find the Unity integration version under:
FMOD → About Integration
I managed to completely eliminate the the flickering by updating the brain in Update() manually. For now I have not noticed any adverse effects, but I suppose this could cause problems for some users.
I’m using FMOD Studio 2.03.11 and Unity integration Version: 2.03.11
Build Number: 158528
Thank you for sharing your solution here.