Trigger sound on movement

I have a multisound with 14 different sounds of shattering glass. What I am looking to do it make it so that a throwing movement - in vr - triggers one of the sounds. How can I do this - triggering an audiofile on movement (speed/distance I presume)?

Your game’s code needs to create and start an instance of the event that contains the multi instrument. Assuming you’re using the FMOD Studio API, information on creating and starting event instances can be found in this section of the FMOD API User Manual.

If you want an existing event instance to alter its behavior depending on its speed relative to (or distance from) the listener, a simple option is to add a parameter sheet for a speed (or distance) built-in parameter to the event, and position the multi instrument such that it is only triggered at specific parameter values. Information on parameters can be found in this section of the FMOD Studio User Manual.

Hey Joseph,

Sorry for my late reply. Thank you! That is exactly what I am doing though and the point is that it doesn’t work in unity. When I change the speed nothing sounds.

Does the event work when you audition it in FMOD Studio, and change the value of the speed parameter by adjusting the parameter value dial?

And when you connect to your game using live update and record a profiler session, does an instance of the event appear and continue existing throughout the session?

Yes in Fmod changing the value of the speed triggers the sound! What do you mean by live update and profiler session?

Live update allows you to connect your game to FMOD Studio and view the behavior of your game using FMOD Studio’s profiler window. The profiler contains a host of useful tools for troubleshooting problems like the one you describe.

You can record your game’s behavior during live update to create a “profiler session,” a recording of your game’s audio output, FMOD API calls, and performance over a specific period of time. A profiler session can then be inspected and replayed as needed to troubleshoot issues that manifested during the recorded period.