Hello!
I have some trouble with my game. I have the following code:
local physics = require ("physics") physics.start(); physics.pause() physics.setDrawMode( "hybrid" ) physics.setGravity(0, 10) local ball = display.newImage("graphics/ball.png") ball:scale(0.2, 0.2) ball.x = display.contentCenterX; ball.y = display.contentCenterY - 150; ball:setFillColor(1, 1, 1) physics.addBody(ball, "dynamic", {radius=ball.contentWidth/2, density=1.0, friction=0.2, bounce=1.0}) local platform = display.newImage("graphics/platform.png") platform:scale(0.5, 0.5) platform.x = display.contentCenterX platform.y = display.contentCenterY + 200 physics.stop()
It should create a ball that is a physic body that is affected by gravity (it is supposed to fall down) but after running this code I only see my ball and it’s not moving. Any ideas what’s wrong?
Regards.