I’m using collision detection to play sound when object bounces
local function ballBounce( self, event ) if ( event.phase == "ended" ) then audio.play(bounce) end end
which works well but when ball stops bouncing and is just rolling on the ground the sounds play several times per second. Any suggestion how to modify the function to ignore rolling?