Bullet body passing through coin sensors in my game?

Hey guys, hope someone here can help me out with an interesting problem I've been having.

I'm adding coins to this game: http://www.luxahoy.com so that when you fire a cannonball, that cannonball body can collect coins in the scene.

The cannonball is a dynamic circle with bullet set to true. The coins are small circle sensors. With a decent framerate, box2d detects the collision between those 2 bodies no problem, but on slower framerates the bullet body tunnels right through the coins.

Anyone have an idea of how I could maybe leverage ray casting or something like that? Any insight would be greatly appreciated
The bullet setting won't help you with sensors. There is no callback for sensor crossings. Instead, you should use a ray cast.
Thanks for the reply! The contact listener is firing though, it's just if the frame rate or step goes below a certain point that the sensors don't work.

To clarify the cannonball is dynamic, but the coins are static sensors.
I like the way you can sink yourself if you're not careful, haha...!

Maybe you could make the coins a regular (non-sensor) fixture and just disable the collision response when the cannonball hits them - they are about to disappear anyway right? You would also need to set collision filters so that the coins didn't interact with anything else.
Ah, I think we're on to something!

I should have mentioned, this problem only shows up on mobile. We think it has less to do with frame rate and more to do with mobile webkit.

On desktop, the MIN VALUE in JS https://developer.mozilla.org/en/JavaSc ... /MIN_VALUE is 5e-324... but on mobile it's 0... this seems to mess up some of box2d's math.

Looking into ways to tweak the box2d code a bit to allow for this mobile issue.

EDIT: yep that's definitely the info: http://code.google.com/p/box2dweb/issue ... ort=&id=29 I'll post back if we figure out a fix
My solution was to define Box2d.MIN_VALUE in the first scope closure, and if it's 0 find the smallest possible value above 0:
Code:
   a2j.MIN_VALUE = Number.MIN_VALUE;
   var d = 2;
   while (a2j.MIN_VALUE === 0) {
      a2j.MIN_VALUE = 1/(Number.MAX_VALUE/d);
      d *= 2;
   }

then replace all the Number.MIN_VALUE 's with Box2D.MIN_VALUE

Track the issue here.

Original thread: https://box2d.org/forum/viewtopic.php?t=8398