Hi,
I’ve created a polygon display object and attached it to the physics system using the same shape coordinates as the polygon, but the physical shape is offset to the right and downwards a little (maybe 20 pixels or so). here’s my code:
local vertices = {-79.372,-96.028,4.948,-80.618,200.578,56.782,-19.502,116.772,-106.652,3.092} aquarium1 = display.newPolygon(gamearea\_scene\_layer0, 0, 0, vertices) aquarium1.fill = { type="image", sheet=aquarium\_sheet, frame=1 } aquarium1.x = -50.4 aquarium1.y = 96 aquarium1.anchorX = 0.5 aquarium1.anchorY = 0.5 physics.addBody(aquarium1, "dynamic", {density=1, friction=0.1, bounce=0.5, filter={categoryBits=1, maskBits=1, groupIndex=1}, shape={-79.372,-96.028, 4.948,-80.618, 200.578,56.782, -19.502,116.772, -106.652,3.092}})
Any ideas what I’m doing wrong?
Thanks
Mat