Physics question - One static block vs multiple small static blocks

Hi everyone,

I have a bit of a problem… When I place tiles next to each other with their physics set to static and a ball skids along the surface, it’s very jittery and bounces now and again. But if I place one long display.newRect it skids along smoothly? I have changed the Iterations etc, but can’t get it smooth. Any ideas?

Regards

T [import]uid: 134920 topic_id: 25387 reply_id: 325387[/import]

Hey there,

I just tried to reproduce this with really basic code;
[lua]require ( “physics” )
physics.start()
physics.setGravity( 0, 9 )
physics.setDrawMode ( “hybrid” )

local block = {}

for i = -1, 14 do
block[i] = display.newRect( i*20, 300, 20, 20 )
physics.addBody(block[i], “static”)
end

local ball = display.newCircle( 0, 0, 20 )

physics.addBody(ball, {radius=20})
ball:applyForce(0.2,0)[/lua]

And I can’t seem to do so - could you elaborate on how your code is different to the above, please? (Are you applying force to the ball of moving it differently? What about body shapes? Etc.)

Peach :slight_smile: [import]uid: 52491 topic_id: 25387 reply_id: 102553[/import]