Collision Just Not Working?

I have collision working fine on other objects in my game.

But I have an issue with one object not registering collision events.

The object, “a bullet” quite happily destroys enemies, bases and enemy bullets.

I have 4 invisible Rects for boundaries.

The bullet will often miss the enemy and traverse towards the ceiling Rect. But it just will not register the collision so I can remove the bullet.

It is driving me nuts.

I have tried everything I can think of.

What I am asking is for suggestions of what may be the culprit, yes I know there are lots of things to consider but a fresh mind would sure help.

Hi @bubblebobble,

Since you refer to this object as a “bullet”, then I assume it’s exactly that: a very fast-moving object. In this case, it’s possible that the collision sensing will not sync quickly enough with the movement of the object, and it will “pass through” smaller objects. The common remedy to this is setting the object as a bullet using the “isBullet” property. Just remember that by doing so, you’re devoting a bit more processing power to that object… but it shouldn’t be a problem unless you have dozens of these bullets flying around at once.

http://docs.coronalabs.com/api/type/Body/isBullet.html

You can also increase the physics collision “sensitivity” if needed, at an additional minor cost on performance, but try the isBullet approach first and see if that helps.

Brent

Hi @bubblebobble,

Since you refer to this object as a “bullet”, then I assume it’s exactly that: a very fast-moving object. In this case, it’s possible that the collision sensing will not sync quickly enough with the movement of the object, and it will “pass through” smaller objects. The common remedy to this is setting the object as a bullet using the “isBullet” property. Just remember that by doing so, you’re devoting a bit more processing power to that object… but it shouldn’t be a problem unless you have dozens of these bullets flying around at once.

http://docs.coronalabs.com/api/type/Body/isBullet.html

You can also increase the physics collision “sensitivity” if needed, at an additional minor cost on performance, but try the isBullet approach first and see if that helps.

Brent