I am making an app that is a simple game with a ball. I have it set up that when you touch anywhere on the screen the ball bounces. The only problem that I have is that you can double bounce and keep pressing the button and the object will always stay in the air. Here is my code for jumping...
physics.addBody( circle, "dynamic",{ density=1, friction=0.5, bounce=0.3 })
local onTouch = function(event)
timer.performWithDelay(1000, event )
circle:applyLinearImpulse(5,-3, circle.x, circle.y)
end
Runtime:addEventListener("touch", onTouch)