- Home /
AudioSource (''landing'') play problem
Hi, I'm making a platform game "in 3d", now I'm adding the music and some sounds, but I have a problem, i found how to play clips here https://docs.unity3d.com/ScriptReference/AudioSource.PlayOneShot.html , but, my player is a cube, wich can rotate (when it go foreward and backward), in the script in the section OnCollisionEnter(), with the ground, so when the players collide with it, like when it grounds after a jump, it's the audio.PlayOneShot(impact, 1F); but, every time the players roll (and it's already onto the ground), the audio is played. it's a way to "say", to multiply the VolumeScale for the force that the player hit the ground? like audio.PlayOneShot(impact, 0.001F*----force-----); ? So, when it only touches it, the audio won't be hearable? Tanks :)