For all the physics guru…
I have a static floor. I also have a dynamic box.
Both have friction to them.
Now, if I move the static floor to the left by 200, I would expect the box to also move to the left because of the friction. But in my test, only the floor move to the left? What am I missing!
I’ve try increasing friction, but still, the box doesn’t move, even if it sits on the floor…
local physics = require("physics") physics:start() physics.setGravity(0,20) physics.setDrawMode("hybrid") --- The floor floor1 = display.newRect(0, display.contentHeight - 20,display.contentWidth, 20) floor1.anchorX = 0 floor1.anchorY = 0 floor1:setFillColor( 1,1,1 ) physics.addBody(floor1, "static", { friction=1, bounce=0.01, density=2.0 }) local box = display.newRect(500, 100, 100, 100) physics.addBody( box, "dynamic", { friction=1, bounce=0.01, density=2.0} ) box.rotation = 1 box:addEventListener( "tap", function() transition.to(floor1, {x = floor1.x -200, time=1000}) end )