title: Corona SDK custom physics bodies
body: <p>i have some trouble with the custom shapes in corona.</p>
  
  <p>Here is my code and what it does is that i'm adding some spheres to the scene so that they fall inside a basket, this basket is the custom shape object that i defined in the newBasket() function, the problem is that the basket does collide with the ground object but it doesn't collide with the spheres and i don't know why, please someone help me here, i can't find a solution elsewhere, thanks in advance.</p>
  
  <pre><code>_W = display.contentWidth
  _H = display.contentHeight
  
  --Physics
  local physics = require("physics")
  physics.start()
  physics.setDrawMode("debug")
  
  -- iOS
  display.setStatusBar(display.HiddenStatusBar)
  
  -- screen boundaries
  local ground = display.newRect(0, _H, _W, 5)
  local leftWall = display.newRect(0,0,1,_H)
  local rightWall = display.newRect(_W,0,1,_H)
  physics.addBody(ground, "static", {friction = .2, bounce = .1})
  physics.addBody(leftWall, "static", {friction = .2, bounce = .1})
  physics.addBody(rightWall, "static", {friction = .2, bounce = .1})
  
  local function newBasket()
      local body = display.newImage("assets/basket.png")
      body.x = 0 body.y = 0
  
      local physics_body = {}
      physics_body["basket"] = {
          {
              --LeftArm
              density = 10, friction = 10, bounce = 0.15, 
              shape = {-126, 40, -110, 40, -140, -64, -156, -64}
  
          },
  
          {
              --Bottom
              density = 10, friction = 1, bounce = 0, 
              shape = {-121, 60, 125, 60, 128, 40, -126, 40}
  
          },
          {
              --RightArm
              density = 10, friction = 10, bounce = 0.15, 
              shape = {113, 40, 129, 40, 158, -64, 143, -64}
  
          }
  
      }
      physics.addBody(body, unpack(physics_body["basket"]) )
  
      return body
  end
  
  local basket = newBasket()
  basket.x = _W * .5 basket.y = _H - 100
  
  local function newPlanet()
  
      local planets = {
          {img = "bigBall.png", radius = 45},
          {img = "mediumBall.png", radius = 30}, 
          {img = "smallBall.png", radius = 20}
      }
  
      local n = math.random(1,3)
  
      local img = "assets/" .. planets[n].img
      local ball = display.newImage(img)
      ball.x = math.random((_W * 0.5) -100, (_W * 0.5) + 100) ball.y = 0
  
      physics.addBody(ball, {bounce = 0.3, radius = planets[n].radius})
  end
  
  local function spawnPlanets(number)
  
      local function spawn(e)
          newPlanet()
  
          if(e.count == number) then
              timer.cancel(tmr)
              tmr = nil
          end
      end
  
      tmr = timer.performWithDelay(500, spawn, number)
  end
  
  spawnPlanets(20)
  </code></pre>