I have a problem with physics shape, trying to create a polygon shape in my floor but i’m getting some weird shapes/shadows
i got this:
local floor = display.newImageRect("street\_pattern.png", screenW, 76)
floor:setReferencePoint(display.BottomLeftReferencePoint)
floor.x, floor.y = 0, display.contentHeight
floorShape = { 0, -38, 90, -10, screenW, -10, screenW, 38, -screenW, 38, -screenW, -10, -90, -10 }
physics.addBody( floor, "static", { density=0.5, friction=0.5, bounce=0, shape=floorShape } )
This is the shape i want to get :
http://imageshack.us/photo/my-images/703/iwantg.png/
This is the shape i’m getting :
http://imageshack.us/photo/my-images/138/getting.png/
thanks
[import]uid: 145662 topic_id: 26115 reply_id: 326115[/import]
And in most other 2D physics systems, as far as I have seen.