In the game I need to loop an idle engine sound of the car till the player is holding his touch. Engine should start on starting the touch and stop on ending the touch. How could we achieve this using sound entity in Playcavas?
Add your sound component and add a sound slot, make sure to disable autoplay and overlap.
In your code now you can start playing the sound as soon as the touch start, and call stop when it ends. Here you can find the relevant API calls: