VR Drums project with immersive sound.
I created this in Unity as inspired by Valem's tutorial.
Video Demonstration:
Screenshots:
Code Sample:
private void OnTriggerEnter(Collider other){ if(other.CompareTag(targetTag)){ VelocityEstimator estimator = other.GetComponent(); if(estimator && useVelocity){ float v = estimator.GetVelocityEstimate().magnitude; if(randomizePitch) source.pitch = Random.Range(minPitch, maxPitch); source.PlayOneShot(clip, volume); }else{ if(randomizePitch) source.pitch = Random.Range(minPitch, maxPitch); source.PlayOneShot(clip); } } }