Is there some way to make a stack of physics objects NOT behave like jello?
No matter how I set the parameters a sizable stack becomes jello-like and it looks terrible! I’m making a “karate-like” game, where a stack of wood plates are to be cracked. These wood parts are made of two
objects that balances on one support each so that when the user hits them from above they “break”:
The physcal objects look like this:
And in the game it look like this (more or less)
Anyway, the problem is that when the physics are started, the stack “slumps down” and wobbles like the objects are made of nothing hard, but some kind of jello. This looks absolutely awful. In addition, the stacks are unstable and WILL fall down eventually.
Today I have to use a timer and start the physics right before the “hit” for the stacks not to fall down by themselves.
I’ve made a super simple example showing the jello problem:
local physics = require("physics") \_W = display.contentWidth \_H = display.contentHeight \_BOTTOM = \_H + (display.actualContentHeight - \_H)/2 physics.start() physics.setDrawMode("debug") --physics.setGravity(0,1); local ground = display.newRect(\_W/2, \_BOTTOM, \_W, \_H\*0.03) ground.anchorY = 1 physics.addBody(ground, "static") local brickHeight = \_H\*0.03 local brickList = {} for i=1,30 do -- Bricks local offsFromBotPart = \_BOTTOM - ground.height - (i-1) \* brickHeight brickList[i] = display.newRect(\_W\*0.5, offsFromBotPart, \_W\*0.1, brickHeight) brickList[i].anchorY = 1.0 physics.addBody(brickList[i], {density=1, friction=1.0, bounce=0.0}); end
Is this how is must be with the physics engine? Or is there some trick that I do not know about?