In an emmitter on ball game object, I have a music hit triggering on ball collision (“bumps”). I want it to fade this emitter out once I am close to a certain game oblect.
I have an event parameter (toEndbumps) controlled by a variable that is the distance between the ball and the certain game object (vimeovector).
In the ball user control script I do this in the FixedUpdate()
//calculate distance between ball and vimeo screen
float vimeovector = Vector3.Distance(rb.transform.position,(GameObject.FindGameObjectWithTag(“Vimeo Screen”)).transform.position);
toEndbumps.setValue (vimeovector);
It refuses to change. In the Event Editor in FMOD, the event works fine; I dial down the parameter and it fades the sound to a curve starting at distance 10. My guess is that every collision resets the initial value of that parameter? The vimeovector float works for all other event parameters where I am also controlling volume in Fixedupdate.