Physics
- 2. local physics = require "physics”
physics.start()
local circle = display.newCircle(0,0,40)
circle.x = 150
circle.y = 100
physics.addBody(circle, {density = 1.0, friction = 0.3, bounce = 0.5})
local foot = display.newRect(0,0, display.contentWidth, 20)
foot.y = display.contentHeight – 10
physics.addBody(foot, "static", {density = 1.0, friction = 0.3, bounce = 0.5})