Question by
burmeisc · Feb 23, 2016 at 02:20 PM ·
collideraudiotriggercollision detectionoculusrift
Problem to Trigger sound with OVR Player
Hey,
I know there are a lot of Questions and Answers about this out there. But I don't know what's not working right now.
I'm trying to create a VR for the Oculus Rift DK2. Therefore I tried to create an Audio Zone, so if the player enters, music starts playing.
I put in the OVR PlayerController prefab and tagged it "Player".
Then I created a Sphere Collider and checked "isTrigger". And added the following script as a component:
void onTriggerEnter (Collider other) { theCollider = other.tag; if (theCollider == "Player") { AudioSource audio = GetComponent<AudioSource>(); audio.Play(); audio.loop = true; } }
Thanks for help in advance!
Comment
Answer by burmeisc · Feb 24, 2016 at 03:13 PM
Omg it's On TriggerEnter not on TriggerEnter. I hate my life.