moving ground objects problems?

so im having a physics based problem where when i move my ground static objects they still exist in the same spot.

in the script below i loaded a small map with ground and some walls and a random dynamic object

as the dynamic object falls and the ground moves away from the object the object will never fall no matter how way the ground is away from the object.

why is the ground physics staying in the same place but the image of the ground moving away???

if selectedMap == 1 then background = display.newImage("screens/BG.png") background.x = display.contentWidth /2 background.y = display.contentHeight /2 --Function to spawn an object local function spawn(params) for i = 1,1 do local object = display.newImage(params.image) object.x = params.objectx object.y = params.objecty object.isVisible = params.visible object.oldx = object.x object.oldy = object.y --Set the objects table to a table passed in by parameters object.objTable = params.objTable --Automatically set the table index to be inserted into the next available table index object.index = #object.objTable + 1 --Give the object a custom name object.myName = "Object : " .. object.index --If the object should have a body create it, else dont. if params.hasBody then --Allow physics parameters to be passed by parameters: object.density = params.density or 0 object.friction = params.friction or 0 object.bounce = params.bounce or 0 object.isSensor = params.isSensor or false object.bodyType = params.bodyType or "dynamic" if params.polygon == "false" then physics.addBody(object, object.bodyType, {density = object.density, friction = object.friction, bounce = object.bounce, isSensor = object.isSensor, isBullet = params.isBullet}) end if params.polygon == "true" then physics.addBody(object, object.bodyType, {density = object.density, friction = object.friction, bounce = object.bounce, isSensor = object.isSensor,shape = object.vertexPoints}) end end --The objects group object.group = params.group or nil --If the function call has a parameter named group then insert it into the specified group object.group:insert(object) --Insert the object into the table at the specified index object.objTable[object.index] = object return object end end wallPanels = display.newGroup() solidWalls = display.newGroup() --Create a table to hold our spawns local spawnTable = {} --Create spawn for i = 1,1 do local spawns = spawn( { objectx = 300, objecty = 325, polygon = "false", vertexPoints = nil, isBullet = true, visible = true, image = "tiles/floorTile.png", objTable = spawnTable, hasBody = true, friction = 0.4, bounce = 0.1, ground = false, bodyType = "kinematic", group = solidWalls, } ) end for i = 1,1 do local spawns = spawn( { objectx = 400, objecty = 325, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/floorTile.png", objTable = spawnTable, hasBody = true, friction = 0.4, bounce = 0.1, bodyType = "kinematic", group = solidWalls, } ) end for i = 1,1 do local spawns = spawn( { objectx = 500, objecty = 325, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/floorTile.png", objTable = spawnTable, hasBody = true, friction = 0.4, bounce = 0.1, bodyType = "kinematic", group = solidWalls, } ) end --------------------------------------------- -- Wall Tiles -- --------------------------------------------- for i = 1,1 do local spawns = spawn( { objectx = 200, objecty = 125, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/wallTileA.png", objTable = spawnTable, hasBody = false, friction = 0.4, bounce = 0.1, bodyType = "static", group = wallPanels, } ) end for i = 1,1 do local spawns = spawn( { objectx = 200, objecty = 225, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/wallTileA.png", objTable = spawnTable, hasBody = false, friction = 0.4, bounce = 0.1, bodyType = "static", group = wallPanels, } ) end for i = 1,1 do local spawns = spawn( { objectx = 400, objecty = 125, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/wallTileA.png", objTable = spawnTable, hasBody = false, friction = 0.4, bounce = 0.1, bodyType = "static", group = wallPanels, } ) end for i = 1,1 do local spawns = spawn( { objectx = 300, objecty = 125, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/wallTileB.png", objTable = spawnTable, hasBody = false, friction = 0.4, bounce = 0.1, bodyType = "static", group = wallPanels, } ) end for i = 1,1 do local spawns = spawn( { objectx = 350, objecty = 225, polygon = "false", vertexPoints = nil, visible = "true", image = "tiles/windowTile.png", objTable = spawnTable, hasBody = false, friction = 0.4, bounce = 0.1, bodyType = "static", group = wallPanels, } ) end end obj = display.newImage("tiles/button.png") obj.x = 300 obj.y = 100 physics.addBody(obj, "dynamic", {density = 100, friction = 3, bounce = .01}) local movingLeft = "true" local movingRight = "false" function moveWorld() solidWalls.x = solidWalls.x - .2 end timer.performWithDelay(1,moveWorld,-1)

If you could just shorten your code and put the necessary things, I could help you with your problem

If you could just shorten your code and put the necessary things, I could help you with your problem