Different Audios for Rear camera and Front Camera?
Hello,
I'm trying to play different audio tracks depending on the Camera I switch to.
Here's my pseudo code:
If (I switch to Front camera) play front.mp3 and disable rear.mp3
If (I switch to Rear camera) play rear.mp3 and disable front.mp3
I'm pretty new to this, any tips would help a lot!
Thanks!
Hi Jimmi,
your pseudocode is 100% correct. I would suggest you start tackling the issue in a more "Lens Studio way".
Write two scripts, where one plays the front and one the back mp3.
Then check the script events page and scroll to Camera Events.
Add the two scripts to the corresponding parent object of your lens and let one be triggered on 'Switched To Front' and the other on 'Switched To Back' Camera.
Good luck and feel free to ask any further questions.
Cheers,
Luka
Thanks, Luka, I will post code when it's ready!
PlaySeparateAudio.js:
Thanks!
Yo Jimmi,
glad to see you figured it out and so cool of you to share it for future reference.
Cheers,
Luka
Great script Jimmi! Thanks for sharing :D