Ooops, just noticed I forgot to post the code. Sorry.
[lua]_W = display.contentWidth
_H = display.contentHeight
local physics = require( “physics” )
physics.start()
platform=display.newRect(0, 0, 300, 20 )
platform:setFillColor(255,0,0)
platform.x= _W/2
platform.y=_H/2 + 100;
physics.addBody( platform,“static”, { bounce=0.8, friction=0.1 } )
platform2=display.newRect(0, 0, 20, 200 )
platform2:setFillColor(255,0,0)
platform2.x= _W/2 + 160
platform2.y=_H/2 + 25;
platform2.rotation = 40
physics.addBody( platform2,“static”, { bounce=0.8, friction=0.1 } )
platform3=display.newRect(0, 0, 20, 200 )
platform3:setFillColor(255,0,0)
platform3.x= _W/2 - 160;
platform3.y=_H/2 + 25;
platform3.rotation = -40
physics.addBody( platform3,“static”, { bounce=0.8, friction=0.1 } )
ball = display.newCircle(0, 0, 20);
ball.x = _W * 0.5 - 160;
ball.y = 0;
physics.addBody( ball,“dynamic”, {density = 1, bounce=0.8, friction=0.1, radius = 20 } )
local function throw()
ball:applyLinearImpulse(0, -5);
end
timer.performWithDelay(5000, throw, 0); [import]uid: 17138 topic_id: 12318 reply_id: 45491[/import]