Is there any way to make it possible so when the user looks at a specific place a special music gets activated?
Hi guys. Im recently working on a unity project which is kinda complicated comparing to the fact that is my first time working with unity. Im doing an virtual reality android app which can be used through google cardboard. I have been told to enter music on the scene, different music based on where the user is looking at, ex. if the user sees the trees he hears the birds singing sound and so on, and sincerely i dont know where to start from :/ I really need heeelp.
Answer by Jordi-Bonastre · Feb 23, 2016 at 02:45 PM
You could use OnBecameVisible to start the clip and OnBecameInvisible to stop it, for example.
http://docs.unity3d.com/ScriptReference/Renderer.OnBecameVisible.html http://docs.unity3d.com/ScriptReference/Renderer.OnBecameInvisible.html
thank you for answering. actually im new on program$$anonymous$$g and unity as well so its a bit difficult for me :/ can you please be more specific? i mean if you could possibly help me with some kind of script that can put me to the right direction i would totally appreciate. Thank u again :)