Linear impulse with reversed gravity...

[code]module(…, package.seeall)

local physics=require “physics”

physics.setGravity(0, -9.8)
function new()
local localGroup3 = display.newGroup()

local bkg=display.newImage(“background.png”)
localGroup3:insert(bkg)

local ball=display.newImage(“betterball4.png”)
ball.x=display.contentWidth/2
ball.y=display.contentHeight-100
physics.addBody(ball)

local function linearImpulse(event)

ball:applyLinearImpulse( 0, -2, ball.x, ball.y)

end

ball:addEventListener(“touch”, linearImpulse)

local function destroyObj(event)
if event.numTaps == 2 then
ball:removeSelf()
end
end
ball:addEventListener(“tap”, destroyObj)

localGroup3:insert(ball)

local start=display.newImage(“path3773.png”)
start.x=display.contentWidth/2
start.y=display.contentHeight/2
physics.addBody(start, “static”)
start.rotation=180
localGroup3:insert(start)

return localGroup

end

[/code]

In this code there is a problem. In fact when I tap the ball (this happens only with reversed gravity) it fly away… why??? [import]uid: 27760 topic_id: 27579 reply_id: 327579[/import]

This is a code support thread, not a feature request. Please try to post in the correct forums. Feature requests are for feature requests for the Corona SDK. [import]uid: 84637 topic_id: 27579 reply_id: 112186[/import]