I’m fooling around with the physics engine a bit. I’m trying to place 12 blocks in a stack, but after a while (15 seconds or so) it topples over:
local physics = require("physics") physics.start() local w = display.contentWidth local h = display.contentHeight -- Ground local ground = display.newRect(w/2,h-30,w,30) physics.addBody(ground, "static", { density=5.0, friction=0.3, bounce=0.2}) -- Blocks for i = 0, 12 do local block = display.newRect(w - 100, h - 75 - i\*50, 50, 50) physics.addBody(block, "dynamic", { density=2.0, friction=0.9, bounce=0.0}) end
I guess this is quite realistic as it would surely do this in real life with small inaccuracies, wind etc.
My question is this: Is there any way to control this “realism”? What if I actually wanted these blocks to stay put until knocked down by a bird or something original?