Issue with physics

Hi

I have a problem with the physics. I’m creating a physics game and have a map set up with a specific scale. But when I add a dynamic box in between two static boxes it “sticks” and won’t go down. I have tried different friction setting etc., and played with the settings like setPositionIterations() etc., but nothing works.

It is possible to create a smaller box, but then it won’t work to well with my map system. Anyone with a solution?

Thanks in advance

Image Hosted by ImageShack.us
[import]uid: 95786 topic_id: 32327 reply_id: 332327[/import]

If you zoom in you can clearly see where the grey boxes(dynamic) don’t fit exactly with your green(static). Both the one you have labelled as stuck and the one on the upper left appear slightly larger(or more likely your static objects are overlapping each other by a pixel or so). Fix that overlap one way or the other and you should be good to go.

[import]uid: 147305 topic_id: 32327 reply_id: 128687[/import]

I have them set to a correct scale, however it seems like the dynamic body somehow expands just slightly so it won’t work. reducing the scale will result in some ugly small gaps. [import]uid: 95786 topic_id: 32327 reply_id: 128738[/import]

If you zoom in you can clearly see where the grey boxes(dynamic) don’t fit exactly with your green(static). Both the one you have labelled as stuck and the one on the upper left appear slightly larger(or more likely your static objects are overlapping each other by a pixel or so). Fix that overlap one way or the other and you should be good to go.

[import]uid: 147305 topic_id: 32327 reply_id: 128687[/import]

I have them set to a correct scale, however it seems like the dynamic body somehow expands just slightly so it won’t work. reducing the scale will result in some ugly small gaps. [import]uid: 95786 topic_id: 32327 reply_id: 128738[/import]

Must be because the physics api has a wonky xScale/yScale factor. Have you tried using this physics-lite implementation: http://omnigeek.robmiracle.com/2011/12/14/collision-detection-without-physics/ [import]uid: 179529 topic_id: 32327 reply_id: 129201[/import]

Must be because the physics api has a wonky xScale/yScale factor. Have you tried using this physics-lite implementation: http://omnigeek.robmiracle.com/2011/12/14/collision-detection-without-physics/ [import]uid: 179529 topic_id: 32327 reply_id: 129201[/import]