When you add to the polygon of physics there is an error. When another object falls to the polygon, he falls through it.
Example:
display.setStatusBar(display.HiddenStatusBar) local physics = require("physics") physics.start() physics.setDrawMode("hybrid") vertices = {-100,-100,130,-10,150,-300,150,100} local polygon = display.newPolygon( 300, 280, vertices ) physics.addBody(polygon, "static", {density = 1,friction=0, bounce=0.4}) local rect = display.newRect( 395, 10, 40, 40) physics.addBody(rect, {density = 1,friction=1, bounce=0.1})
If you create a form of lines, all works.
Example:
display.setStatusBar(display.HiddenStatusBar) local physics = require("physics") physics.start() physics.setDrawMode("hybrid") vertices = {-100,-100,130,-10,150,-300,150,100} local polygon = display.newPolygon( 300, 280, vertices ) --physics.addBody(polygon, "static", {density = 1,friction=0, bounce=0.4}) local rect = display.newRect( 395, 10, 40, 40) physics.addBody(rect, {density = 1,friction=1, bounce=0.1}) local line = display.newLine( 175,280, 407,369 ) line:append( 425,82,425,482,175,280) physics.addBody(line, {friction=1, bounce=0.4}) line:setStrokeColor( 0, 0, 1 ) line.strokeWidth = 5