Let me interject.
One simply does not solve this by upping the iterations. I’ve done EVERYTHING you can possibly think of to counter “tunneling” go read the box2d documentation, and search google “tunneling box2d” you will see this is an unsolvable issue.
Can you reduce it sure, but I would not advertise false hope. This isn’t a corona sdk thing it’s a box 2d thing. It has to do with rounding. In Cocos2d you can do “stepping” which makes the rounding more accurate. However think about this.
Dynamic vs static object = not a problem (usually, 99.99% of time)
Dynamic vs Dynamic = problems. WHY? Well, think about it. If rounding is happening on both objects and lets say they are a few pixels apart and are about to collide. One gets rounded and is a couple pixels to left, the other is to the right…oops they pass through each other and everyone is sad.
I’ve been working on this issue since June 2011, and it appears I must be the MOST hardcore advocate and been trying to help people out with this. It’s insane.
I have a lot of advice, even wrote my “MLMOCD” or multi layer multi object collision detection module. That reduces A LOT. It’s easy to do:
Create the bullet. Now create another object within the bullet and weld the 2 to each other
On the wall, create the wall and create another smaller wall.
Then you write a detection function of sorts that says when the inside object is within x and y from another object you apply a TEMPORARY damping to the object JUST before impact and then take it off. Performance will be hit though, so its a case by case basis.
I could go on and on and on, I have posts on here, all over the place about it. I have youtube videos, etc. isBullet helps, iterations help (hell, I’ve gone 1024 on velocity and position iterations, that barely helped. The things that seem to help most and are easiest is to slow things down.
PLay with the scale, use a scale of 6 or something and increase gravity to around 300 to 400 to get the same “feel” of scale 60 and 10 gravity…ok I’m done. I could rant on this all day long…
-Nick [import]uid: 61600 topic_id: 26556 reply_id: 107742[/import]