Every time the ball bounce (rapidly…) it generate the hitsound
even if the previous sound still playing.
The hitsound can be up to 2 seconds…
The result: a soundmess…
audio.isPlaying is only for audio.clip and audio.Play(). PlayOneShot is something different that supposedly allows you to have multiple clips for one audio source, but I suspect it’s really doing something like PlayClipAtPoint behind the scenes.
Hey Errormaker, your nickname defines me well I am having troubles with the ball sound too. I have a physix ball bouncing inside a board and I want to add the bouncing sounds, but it seems incredibly difficult to adjust the bouncing sound by the OnCollisionEnter function. My board has a slope and when the ball roles down it it sounds the bouncing sound. I tryied to fix this using collision.impactForceSum and collision.relativeVelocity with no luck. Maybe the issue comes because I have a gravity of (0, -600, -50)… What do you think?
EDIT: I solved this issue playing the sound only with walls