Given a composer scene with this -
function scene:create() local group = self.view cameraGroup = display.newGroup() mapGroup = display.newGroup() cameraGroup:insert(mapGroup) group:insert(cameraGroup) local tileSize = 500 physics.setDrawMode( "debug" ) physics.start() physics.setGravity(0,0) local solidTile = display.newRect(mapGroup, display.contentCenterX, display.contentCenterY, display.actualContentWidth, display.actualContentHeight) solidTile:setFillColor(209/255, 95/255, 95/255) physics.addBody(solidTile, { density=0, friction=0, bounce=0}) solidTile.bodyType = "static" local notSolidTile = display.newRect(mapGroup, display.contentCenterX, display.contentCenterY, tileSize, tileSize) notSolidTile:setFillColor(95/255, 209/255, 95/255) physics.addBody(notSolidTile) notSolidTile.gravityScale = 0 end
I end up with a green tile sliding to the right, inexplicably.
Given the underlying body is static, why is the notSolidTile sliding?