Im testing the tutorial online (Make a game in 8 minutes) and I entered this code -
local ball = display.newImage(“super_ball.png”)
ball.x = 40
ball.y = -1
ball:setReferencePoint( display.CenterReferencePoint )
physics.addBody( ball, {bounce=0.1, radius=23, friction=0.8} )
function moveBall(event)
ball:applyLinearImpulse( 0, -0.05, event.x, event.y )
end
ball:addEventListener( “touch”, moveBall)
It works for the most part, but if I hit the right side of the ball, it doesn’t go left, it just spins faster and faster each time I touch it, and likewise with the left side.
Please help! [import]uid: 39628 topic_id: 7510 reply_id: 307510[/import]