I’d like to play a sound in a loop, then stop the loop with an OnIntersectionTrigger.
It works if I do “music.updateOption({ loop : false });” outside the action manager but it doesn’t work inside.
In fact it does not work even if you do it outside the action manager. In your PG, it works only because the sound is not started yet when you call updateOptions().
Here’s a PR that will correct the problem when merged:
Thank you so much both of you for fixed it, it’ll help me a lot for the interactive music video i’m trying to make.
I see that the PR is now merged. Do I have to wait for the script https://preview.babylonjs.com/babylon.js to update or do I to make something else ?
The sound still play in a loop in the playground and in my project, I cleaned the cache and tried on Firefox and Chrome. I’d like that it’s finish its current play then stop. Sorry, I think I’m still missing something !..