using System.Collections; using System.Collections.Generic; using UnityEngine; public class ImpactRandomPitch : MonoBehaviour { AudioSource source; public float minPitch = 0.6f; public float maxPitch = 1.5f; void Start() { source = GetComponent(); } private void OnTriggerEnter(Collider collider) { source.pitch = Random.Range(minPitch, maxPitch); source.Play(); // Debug.Log("audio.Play Called"); } }